![]() |
• System Utilities | |||||||
|
API Links
Developer Links
|
class MutexDefined in:
The C4Base.hMutex class encapsulates a mutual exclusion object for multithreaded synchronization.
Definition
Member Functions
Constructor
Description
The Mutex class defines a platform-independent mutual exclusion object that can be used for multithreaded synchronization. A mutex can only be owned by one thread at a time and when properly used prevents simultaneous access to resources by multiple threads.Ownership of a mutex is acquired by calling the Mutex::Acquire function. If the mutex is already owned by a different thread when this function is called, then the calling thread blocks until the mutex becomes available. The Mutex::TryAcquire function attempts to acquire ownership of a mutex, but does not block if acquisition fails. Ownership of a mutex is relinquished by calling the Mutex::Release function.
See Also
|