actually lock mutexe
This commit is contained in:
parent
3504f6cc4a
commit
95a988f19b
@ -87,7 +87,7 @@ class WinMutex // Like CMutex but works with scoped_lock
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinMutex(std::wstring name) : m(CreateMutexW(nullptr, FALSE, name.c_str())) {}
|
WinMutex(std::wstring name) : m(CreateMutexW(nullptr, FALSE, name.c_str())) {}
|
||||||
void lock() { if (m) WaitForSingleObject(m, 0); }
|
void lock() { if (m) WaitForSingleObject(m, INFINITE); }
|
||||||
void unlock() { if (m) ReleaseMutex(m); }
|
void unlock() { if (m) ReleaseMutex(m); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user