Locks given mutex in constructor and releases it in destructor.
More...
#include <WinStd/Win.h>
|
| mutex_locker (HANDLE hMutex, DWORD dwMilliseconds=INFINITE) |
| Waits until the specified mutex is in the signaled state or the time-out interval elapses.
|
|
virtual | ~mutex_locker () |
| Releases ownership of the mutex object.
|
|
Locks given mutex in constructor and releases it in destructor.
◆ mutex_locker()
winstd::mutex_locker::mutex_locker |
( |
HANDLE | hMutex, |
|
|
DWORD | dwMilliseconds = INFINITE ) |
|
inline |
Waits until the specified mutex is in the signaled state or the time-out interval elapses.
- Parameters
-
[in] | hMutex | Mutex |
[in] | dwMilliseconds | The time-out interval, in milliseconds. If a nonzero value is specified, the function waits until the object is signaled or the interval elapses. If dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately. If dwMilliseconds is INFINITE, the function will return only when the object is signaled. |
- See also
- WaitForSingleObject function
◆ ~mutex_locker()
virtual winstd::mutex_locker::~mutex_locker |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: