ReentrantLock
ReentrantLock from kotlinx.atomicfu.locks
ReentrantLock is designed for delegation. You write val lock = reentrantLock()
to construct its instance and use lock/tryLock/unlock
functions or lock.withLock { ... }
extension function similarly to the way jucl.ReentrantLock is used on JVM. On JVM it is a typealias to the later class, erased on JS.
ReentrantLock from kotlinx.atomicfu.locks
ReentrantLock is designed for delegation. You write val lock = reentrantLock()
to construct its instance and use lock/tryLock/unlock
functions or lock.withLock { ... }
extension function similarly to the way jucl.ReentrantLock is used on JVM. On JVM it is a typealias to the later class, erased on JS.
ReentrantLock from kotlinx.atomicfu.locks
ReentrantLock is designed for delegation. You write val lock = reentrantLock()
to construct its instance and use lock/tryLock/unlock
functions or lock.withLock { ... }
extension function similarly to the way jucl.ReentrantLock is used on JVM. On JVM it is a typealias to the later class, erased on JS.
ReentrantLock from kotlinx.atomicfu.locks
ReentrantLock is designed for delegation. You write val lock = reentrantLock()
to construct its instance and use lock/tryLock/unlock
functions or lock.withLock { ... }
extension function similarly to the way jucl.ReentrantLock is used on JVM. On JVM it is a typealias to the later class, erased on JS.
Functions
Executes the given block of code while holding the specified ReentrantLock. This function simplifies the process of acquiring and releasing a lock safely.
Executes the given block of code while holding the specified ReentrantLock. This function simplifies the process of acquiring and releasing a lock safely.