W3cubDocs

/Kotlin

Extensions for java.util.concurrent.locks.ReentrantReadWriteLock

Platform and version requirements: JVM (1.0)

read

Executes the given action under the read lock of this lock.

fun <T> ReentrantReadWriteLock.read(action: () -> T): T
Platform and version requirements: JVM (1.0)

write

Executes the given action under the write lock of this lock.

fun <T> ReentrantReadWriteLock.write(action: () -> T): T