closeWithTimeout

fun closeWithTimeout(timeoutMs: Long, doClose: () -> Unit)