summaryrefslogtreecommitdiffstats
path: root/source/OSSupport/IsThread.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-08-15 10:56:52 +0200
committerMattes D <github@xoft.cz>2013-08-15 10:56:52 +0200
commit1a52e89177a907b5d23d3e72f78d30a333da4bfe (patch)
tree8f2783d06d423361b02457c77f90d6ec874a5191 /source/OSSupport/IsThread.h
parentMerge pull request #91 from tigerw/master (diff)
parentAdded simple deadlock detection code. (diff)
downloadcuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.gz
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.bz2
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.lz
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.xz
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.zst
cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.zip
Diffstat (limited to 'source/OSSupport/IsThread.h')
-rw-r--r--source/OSSupport/IsThread.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/OSSupport/IsThread.h b/source/OSSupport/IsThread.h
index 2a4451a4a..9b7f0b73e 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);
@@ -54,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;
}
@@ -70,7 +75,6 @@ private:
}
#endif // else _WIN32
-
} ;