Scoop API

scoop:scoop.platform:0.1.0

Mutex

class Mutex

source · line 9
public
public class Mutex : Disposable

An owned native mutex. Pair lock/unlock on the owning thread or use withLock; dispose only when no operation or held lock remains.

function dispose

source · line 112
public
public override fun dispose(): Unit

Destroys the native mutex when it is no longer in use.

function tryLock

source · line 67
public
public fun tryLock(): Boolean

Attempts acquisition without blocking and returns whether this thread acquired the mutex.

function unlock

source · line 83
public
public fun unlock(): Unit

Releases the mutex held by this thread.

function lock

source · line 50
public
public fun lock(): Unit

Blocks until this thread acquires the mutex.