CoarseLocked

Shared, coarsely-locked wrapper of an unshared T.

Constructors

this
this(T init)

Construct from an initial value with a new lock.

Members

Aliases

M
alias M = TasMutex
Undocumented in source.

Functions

locked
void locked(void delegate(T*) dg)

Lock, call dg(&t) for internal value t, then unlock.

locked
void locked(void delegate() dg)

Lock, call dg(), then unlock.

peek
T* peek()

Unshared accessor to the internal T. WARNING: This method does not provide mutual exclusion.

tryLocked
bool tryLocked(void delegate(T*) dg)

Attempt to lock, and if successful, call dg(&t) for internal value t, then unlock.

tryLocked
bool tryLocked(void delegate() dg)

Attempt to lock, and if successful, call dg() then unlock.

Meta