const class concurrent::Lock

sys::Obj
  concurrent::Lock

Source

Lock for synchronization between actors.

lock

Void lock()

Source

Acquire the lock; if not available then block forever until its available.

makeReentrant

static Lock makeReentrant()

Source

Construct mutual exclusion lock.

tryLock

Bool tryLock(Duration? timeout := null)

Source

Acquire the lock if its free and immediately return true. Or if the lock is not available and timeout is null, then immediately return false. If timeout is non-null, then block up to the given timeout waiting for the lock and return true if lock acquired or false on timeout.

unlock

Void unlock()

Source

Release the lock. Raise exception if not holding the lock.