withLock

inline fun <T> SafeLock.withLock(block: () -> T): T(source)

Runs block with this lock held.

Throws

if close has already been called.