summaryrefslogtreecommitdiff
path: root/src/jthread/jthread.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-12-02 22:21:58 +0100
committerPerttu Ahola <celeron55@gmail.com>2013-12-03 17:50:00 +0200
commit5004f31575c52b59e1fc654dfa08336a692afeee (patch)
tree6b44e7a6a964ce372b968feba3688518a0647010 /src/jthread/jthread.h
parent6cbd1b8bf739e0d776ee508708b5076b491fb638 (diff)
downloadminetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.gz
minetest-5004f31575c52b59e1fc654dfa08336a692afeee.tar.bz2
minetest-5004f31575c52b59e1fc654dfa08336a692afeee.zip
Fix broken async locking in release build
Diffstat (limited to 'src/jthread/jthread.h')
-rw-r--r--src/jthread/jthread.h9
1 files changed, 9 insertions, 0 deletions
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;