Mutex

fun Mutex(locked: Boolean = false): Mutex (source)

Platform and version requirements: JVM

Creates new Mutex instance. The mutex created is fair: lock is granted in first come, first served order.

Parameters

locked - initial state of the mutex.