actually lock mutexe

This commit is contained in:
Akash Mozumdar 2019-02-16 00:23:13 -05:00
parent 3504f6cc4a
commit 95a988f19b

View File

@ -87,7 +87,7 @@ class WinMutex // Like CMutex but works with scoped_lock
{
public:
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); }
private: