withLock

internal fun ReentrantLock.withLock(block: () -> Unit)(source)

The block will run in with the reentrant lock.

Parameters

block

() -> Unit The block of code to execute within the lock.