Function Lock.acquire

Acquire the lock. Suspend the fiber if currently acquired.

void acquire (
  Timeout timeout = Timeout(TscTimePoint(9223372036854775807L))
) @nogc @safe;

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.

Throws

TimeoutExpired if the timeout expires

Anything injected through a call to Reactor.throwInFiber