Lock

actual class Lock
expect class Lock

A lock with read/write semantics where possible.

  • uses Java's ReentrantReadWriteLock on the JVM

  • uses AtomicFu's ReentrantLock on Native (read and write are not distinguished)

actual class Lock
actual class Lock
actual class Lock

A lock with read/write semantics where possible.

  • uses Java's ReentrantReadWriteLock on the JVM

  • uses AtomicFu's ReentrantLock on Native (read and write are not distinguished)

Constructors

Link copied to clipboard
constructor()
expect constructor()
constructor()
constructor()
actual constructor()

Functions

Link copied to clipboard
actual fun <T> read(block: () -> T): T
expect fun <T> read(block: () -> T): T
actual fun <T> read(block: () -> T): T
actual fun <T> read(block: () -> T): T
actual fun <T> read(block: () -> T): T
Link copied to clipboard
actual fun <T> write(block: () -> T): T
expect fun <T> write(block: () -> T): T
actual fun <T> write(block: () -> T): T
actual fun <T> write(block: () -> T): T
actual fun <T> write(block: () -> T): T