Lock.acquire

Acquire the lock. Suspend the fiber if currently acquired.

Upon return, the mutex is acquired. It is up to the caller to call release.

The call is guaranteed not to sleep if the mutex is available.

struct Lock
@safe @nogc
void
acquire

Throws

TimeoutExpired if the timeout expires

Anything injected through a call to Reactor.throwInFiber

Meta