suspend

fun <T> suspend(timeoutMsecs: Long = -1, initfn: (SyncContinuation<T>) -> Unit): T(source)

Calls an initfn that is responsible for starting an operation and saving the SyncContinuation. Then blocks the current thread until the operation completes or times out.

Essentially a blocking version of kotlinx.coroutines.suspendCancellableCoroutine.