diff options
| author | George Hazan <ghazan@miranda.im> | 2021-09-09 22:24:07 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2021-09-09 22:24:07 +0300 |
| commit | 23f0b751b57b2dd9f6e912cec92364ff59b864b2 (patch) | |
| tree | 9b38146c3602b5300856d00bedfc248bce5c7da0 /include | |
| parent | 77a3554616362939d78649fd257f65e464312e68 (diff) | |
fix for a crappy ::GetCurrentThread call that breaks all Wait* functions
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_system.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/m_system.h b/include/m_system.h index 18000d6778..5226961d0f 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -497,18 +497,17 @@ public: ///////////////////////////////////////////////////////////////////////////////
// thread handle controller
-class MThreadHandle
+class MThreadLock
{
HANDLE &m_pHandle;
public:
- MThreadHandle(HANDLE &pHandle) :
+ __forceinline MThreadLock(HANDLE &pHandle) :
m_pHandle(pHandle)
{
- pHandle = ::GetCurrentThread();
}
- ~MThreadHandle()
+ __forceinline ~MThreadLock()
{
m_pHandle = nullptr;
}
|
