summaryrefslogtreecommitdiffstats
path: root/Source/cmServer.h
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2017-07-22 15:29:18 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-31 19:35:46 (GMT)
commit0e4d503384a254c843a065c26f77bc19dfccff16 (patch)
treed37dcc0050435080a9704030d9e6938d7ea708bf /Source/cmServer.h
parent124424e9974ade26521bf4751f3701c1e7d91c3d (diff)
downloadCMake-0e4d503384a254c843a065c26f77bc19dfccff16.zip
CMake-0e4d503384a254c843a065c26f77bc19dfccff16.tar.gz
CMake-0e4d503384a254c843a065c26f77bc19dfccff16.tar.bz2
server: Added thread check to protect writedata
Diffstat (limited to 'Source/cmServer.h')
-rw-r--r--Source/cmServer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmServer.h b/Source/cmServer.h
index d8f73c1..15fd2ba 100644
--- a/Source/cmServer.h
+++ b/Source/cmServer.h
@@ -67,6 +67,15 @@ protected:
bool ServeThreadRunning = false;
uv_thread_t ServeThread;
uv_async_t ShutdownSignal;
+#ifndef NDEBUG
+public:
+ // When the server starts it will mark down it's current thread ID,
+ // which is useful in other contexts to just assert that operations
+ // are performed on that same thread.
+ uv_thread_t ServeThreadId = {};
+
+protected:
+#endif
uv_loop_t Loop;