C++ API Library Reference  4.3.2-74-ge1d4cca
Classes | Public Functions | Friends | List of all members
Mutex Class Reference

Mutex implements a process-wide recursive mutex synchronization object.

Public Functions

virtual void Acquire ()
 
virtual bool IsAlreadyAcquired ()
 
 Mutex ()
 
virtual void Release ()
 
virtual bool TryAcquire (TimeSpan timeout=TimeSpan::Zero())
 
 ~Mutex ()
 

Friends

class ConditionVariable
 
class Monitor
 

Usage Description

virtual void Acquire ( )
inlinevirtual

Acquires the synchronization object. Blocks until the acquisition is complete. Will not throw a ThreadInterruptedException.

virtual bool IsAlreadyAcquired ( )
virtual

Gets whether the mutex is currently acquired by the calling thread.

virtual void Release ( )
inlinevirtual

Releases the synchronization object.

virtual bool TryAcquire ( TimeSpan  timeout = TimeSpan::Zero())
inlinevirtual

Attempts to acquire the synchronization object. Blocks until the acquisiton is complete, or until the timeout period elapses. Returns true if the acquisiton was successful, otherwise false. Will not throw a ThreadInterruptedException.

Friends And Related Function Documentation

friend class ConditionVariable
friend
friend class Monitor
friend