From ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 16:50:14 +0200 Subject: 1.6 --- library/multithreading.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'library/multithreading.cpp') diff --git a/library/multithreading.cpp b/library/multithreading.cpp index c5f38605..099836de 100644 --- a/library/multithreading.cpp +++ b/library/multithreading.cpp @@ -34,6 +34,8 @@ */ class WorkerThread : public wxThread { + friend class UpdateWhileExecuting; + public: WorkerThread(UpdateWhileExecuting* handler) : readyToBeginProcessing(), @@ -43,8 +45,10 @@ public: threadHandler(handler) { } + ~WorkerThread() {} + ExitCode Entry() { readyToBeginProcessing.Lock(); //this lock needs to be called IN the thread => calling it from constructor(Main thread) would be useless @@ -71,7 +75,7 @@ public: return 0; } - +private: wxMutex readyToBeginProcessing; wxCondition beginProcessing; @@ -80,8 +84,6 @@ public: bool threadIsInitialized; bool threadExitIsRequested; - -private: UpdateWhileExecuting* threadHandler; }; -- cgit