write

abstract fun <T> write(action: () -> T): T

Executes the given action under a write lock.