API Reference › Sync › Sync.try_lock
method

Sync.try_lock

Sync.try_lock(mutex) -> bool

Take the lock only if it is free.

Example

let m = Sync.mutex()
let got = Sync.try_lock(m)
← All symbols