runBlockingReentrant
fun <T> runBlockingReentrant(context: ERROR CLASS: Symbol not found for CoroutineContext = EmptyCoroutineContext, block: suspend () -> T): T(source)
Runs a suspending block from blocking code in a reentrant-safe way.
The caller thread is blocked until block completes. The block normally runs with context, but if the current execution is already associated with the same continuation interceptor (dispatcher), it strips the interceptor from the context to avoid redispatching. This avoids redispatch deadlocks when all threads in the target context are busy.
Parameters
context
The coroutine context in which the block should be executed. Defaults to EmptyCoroutineContext.
block
The suspend block of code to be executed.