diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-12 17:12:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-12 17:12:16 +0300 |
commit | 1cd66b3fd75b181deaf35f279b92bf4233dd9814 (patch) | |
tree | 077d3009929213af62601fc643438342a7692ed8 | |
parent | f2b19e75ca2d8381eb501b7a39c30fc94b796ad4 (diff) |
fix against critical section lock up in XP
-rw-r--r-- | src/mir_core/src/Windows/locks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mir_core/src/Windows/locks.cpp b/src/mir_core/src/Windows/locks.cpp index 4783b1ff30..88f4639e80 100644 --- a/src/mir_core/src/Windows/locks.cpp +++ b/src/mir_core/src/Windows/locks.cpp @@ -36,7 +36,8 @@ mir_cs::~mir_cs() void mir_cs::Lock() { - ::EnterCriticalSection(&m_cs); + while (::TryEnterCriticalSection(&m_cs) == 0) + SleepEx(50, TRUE); } void mir_cs::Unlock() |