summaryrefslogtreecommitdiff
path: root/include/m_system.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-04 20:42:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-04 20:42:25 +0300
commit68c7bf3b55ca132143686ab433659c3b828760aa (patch)
tree5e2b5f5bc674f05a4c351a8f4f0ea6b6e596ca16 /include/m_system.h
parentef6ef30fac86de58bfd7d52b1d8a213b8d955d5d (diff)
attempt to fix some problems on exit
Diffstat (limited to 'include/m_system.h')
-rw-r--r--include/m_system.h20
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