summaryrefslogtreecommitdiff
path: root/src/jthread/jthread.h
diff options
context:
space:
mode:
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;