mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
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:
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user