diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-04 20:42:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-04 20:42:25 +0300 |
commit | 68c7bf3b55ca132143686ab433659c3b828760aa (patch) | |
tree | 5e2b5f5bc674f05a4c351a8f4f0ea6b6e596ca16 /include/m_system.h | |
parent | ef6ef30fac86de58bfd7d52b1d8a213b8d955d5d (diff) |
attempt to fix some problems on exit
Diffstat (limited to 'include/m_system.h')
-rw-r--r-- | include/m_system.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/m_system.h b/include/m_system.h index 73b0544554..18000d6778 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -495,6 +495,26 @@ public: };
///////////////////////////////////////////////////////////////////////////////
+// thread handle controller
+
+class MThreadHandle
+{
+ HANDLE &m_pHandle;
+
+public:
+ MThreadHandle(HANDLE &pHandle) :
+ m_pHandle(pHandle)
+ {
+ pHandle = ::GetCurrentThread();
+ }
+
+ ~MThreadHandle()
+ {
+ m_pHandle = nullptr;
+ }
+};
+
+///////////////////////////////////////////////////////////////////////////////
// parameter classes for XML, JSON & HTTP requests
struct PARAM
|