WinStd
Windows Win32 API using Standard C++
|
Locks given mutex in constructor and releases it in destructor. More...
#include <WinStd/Win.h>
Public Member Functions | |
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. | |
Protected Attributes | |
HANDLE | m_h |
Locks given mutex in constructor and releases it in destructor.
Waits until the specified mutex is in the signaled state or the time-out interval elapses.
[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. |
|
inlinevirtual |
Releases ownership of the mutex object.