Mutex

Blocks concurrent access to shared resources from multiple threads.

Mutex stands for "MUTual EXclusion".

A mutex is a synchronization object, used when multiple threads are involved.

When you want to protect a part of the code from being accessed simultaneously by multiple threads, you typically use a mutex. When a thread is locked by a mutex, any other thread trying to lock it will be blocked until the mutex is released by the thread that locked it. This way, you can allow only one thread at a time to access a critical region of your code.

Constructors

this
this()

Default Constructor

Destructor

~this
~this()
Undocumented in source.

Members

Functions

lock
void lock()

Lock the mutex

unlock
void unlock()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta