Mutex.lock

void lock() @trusted

If this lock is not already held by the caller, the lock is acquired, then the internal counter is incremented by one.

Note

Mutex.lock does not throw, but a class derived from Mutex can throw.

Use lock_nothrow in nothrow @nogc code.

void lock() @trusted shared

ditto