From 5004f31575c52b59e1fc654dfa08336a692afeee Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 2 Dec 2013 22:21:58 +0100 Subject: Fix broken async locking in release build --- src/jthread/jthread.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/jthread/jthread.h') diff --git a/src/jthread/jthread.h b/src/jthread/jthread.h index 798750ebb..f7bce6f9a 100644 --- a/src/jthread/jthread.h +++ b/src/jthread/jthread.h @@ -50,6 +50,13 @@ public: bool StopRequested(); void *GetReturnValue(); bool IsSameThread(); + + /* + * Wait for thread to finish + * Note: this does not stop a thread you have to do this on your own + * WARNING: never ever call this on a thread not started or already killed! + */ + void Wait(); protected: void ThreadStarted(); private: @@ -67,6 +74,8 @@ private: static void *TheThread(void *param); pthread_t threadid; + + bool started; #endif // WIN32 void *retval; bool running; -- cgit v1.2.3