withReadLock

suspend fun <R> withReadLock(block: suspend () -> R): R(source)

Executes the given block of code within a read lock. Suspends until the read lock can be acquired.