From 2baa6634ec797d4a64c25fca9b5a0451b69bf886 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 11 Aug 2013 19:40:15 +0200 Subject: cIsThread: Added the Stop() method and debugging output in Wait() --- source/OSSupport/IsThread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/OSSupport/IsThread.h') diff --git a/source/OSSupport/IsThread.h b/source/OSSupport/IsThread.h index 2a4451a4a..e795b25a0 100644 --- a/source/OSSupport/IsThread.h +++ b/source/OSSupport/IsThread.h @@ -39,6 +39,9 @@ public: /// Starts the thread; returns without waiting for the actual start bool Start(void); + /// Signals the thread to terminate and waits until it's finished + void Stop(void); + /// Waits for the thread to finish. Doesn't signalize the ShouldTerminate flag bool Wait(void); @@ -70,7 +73,6 @@ private: } #endif // else _WIN32 - } ; -- cgit v1.2.3 From ac9224da919fb642aba8dde71d1c8deaf0cc8005 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 11 Aug 2013 20:22:42 +0200 Subject: cIsThread threads get a window identification on Win. This enables tools such as TaskInfo to report the thread name directly. --- source/OSSupport/IsThread.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/OSSupport/IsThread.h') diff --git a/source/OSSupport/IsThread.h b/source/OSSupport/IsThread.h index e795b25a0..9b7f0b73e 100644 --- a/source/OSSupport/IsThread.h +++ b/source/OSSupport/IsThread.h @@ -57,7 +57,9 @@ private: static DWORD_PTR __stdcall thrExecute(LPVOID a_Param) { + HWND IdentificationWnd = CreateWindow("STATIC", ((cIsThread *)a_Param)->m_ThreadName.c_str(), 0, 0, 0, 0, WS_OVERLAPPED, NULL, NULL, NULL, NULL); ((cIsThread *)a_Param)->Execute(); + DestroyWindow(IdentificationWnd); return 0; } -- cgit v1.2.3