Public Types | |
enum | AbandonedWaitHandling { IgnoreAbandonedWaits, FailOnAbandonedWaits } |
Specify how to deal with abandoned waits. More... | |
enum | InitialState { Owned, NotOwned } |
Specify the initial state of an event object. More... | |
enum | CreationFlags { CreateOrConnect, CreateNew, ConnectToExisting } |
Specify how to create or connect to an existing event object. More... | |
typedef TLockableObjectOwner < IReentrantLockableObject > | Owner |
typedef TLockableObjectConditionalOwner < IReentrantLockableObject > | ConditionalOwner |
typedef TReentrantLockableObjectPotentialOwner < IReentrantLockableObject > | PotentialOwner |
Public Member Functions | |
CMutex (SECURITY_ATTRIBUTES *pSecurityAttributes=nullptr, AbandonedWaitHandling abandonedWaitHandling=FailOnAbandonedWaits, InitialState initialState=NotOwned) | |
Create an anonymous CMutex object for in-process use. | |
CMutex (const IKernelObjectName &name, SECURITY_ATTRIBUTES *pSecurityAttributes=nullptr, AbandonedWaitHandling abandonedWaitHandling=FailOnAbandonedWaits, InitialState initialState=NotOwned) | |
Create a new named CMutex object or connect to an existing one with the same name, for cross-process use. | |
CMutex (const IKernelObjectName &name, CreationFlags creationFlags, SECURITY_ATTRIBUTES *pSecurityAttributes=nullptr, AbandonedWaitHandling abandonedWaitHandling=FailOnAbandonedWaits, InitialState initialState=NotOwned) | |
Create a new named CMutex object or connect to an existing one with the same name, for cross-process use. Use the CreationFlags to force creation only or connection only if required. | |
CMutex (const CMutex &rhs) | |
~CMutex () override | |
CMutex & | operator= (const CMutex &rhs) |
bool | TryLock () override |
Try to lock the lockable object, returns true if successful and false if the lock is already locked. | |
void | Lock () override |
Lock the lockable object. | |
void | Unlock () override |
Unlock the lockable object. | |
HANDLE | GetWaitHandle () const override |
void | Wait () const override |
bool | Wait (Milliseconds timeout) const override |
typedef TLockableObjectOwner<IReentrantLockableObject> Owner [inherited] |
typedef TLockableObjectConditionalOwner<IReentrantLockableObject> ConditionalOwner [inherited] |
typedef TReentrantLockableObjectPotentialOwner<IReentrantLockableObject> PotentialOwner [inherited] |
enum InitialState |
enum CreationFlags |
CMutex | ( | SECURITY_ATTRIBUTES * | pSecurityAttributes = nullptr , |
|
AbandonedWaitHandling | abandonedWaitHandling = FailOnAbandonedWaits , |
|||
InitialState | initialState = NotOwned | |||
) | [explicit] |
Create an anonymous CMutex object for in-process use.
CMutex | ( | const IKernelObjectName & | name, | |
SECURITY_ATTRIBUTES * | pSecurityAttributes = nullptr , |
|||
AbandonedWaitHandling | abandonedWaitHandling = FailOnAbandonedWaits , |
|||
InitialState | initialState = NotOwned | |||
) | [explicit] |
Create a new named CMutex object or connect to an existing one with the same name, for cross-process use.
CMutex | ( | const IKernelObjectName & | name, | |
CreationFlags | creationFlags, | |||
SECURITY_ATTRIBUTES * | pSecurityAttributes = nullptr , |
|||
AbandonedWaitHandling | abandonedWaitHandling = FailOnAbandonedWaits , |
|||
InitialState | initialState = NotOwned | |||
) |
Create a new named CMutex object or connect to an existing one with the same name, for cross-process use. Use the CreationFlags to force creation only or connection only if required.
~CMutex | ( | ) | [override] |
bool TryLock | ( | ) | [override, virtual] |
Try to lock the lockable object, returns true if successful and false if the lock is already locked.
Implements ILockableObject.
void Lock | ( | ) | [override, virtual] |
void Unlock | ( | ) | [override, virtual] |
HANDLE GetWaitHandle | ( | ) | const [override] |
void Wait | ( | ) | const [override] |
bool Wait | ( | Milliseconds | timeout | ) | const [override] |