summaryrefslogtreecommitdiff
path: root/library/multithreading.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:50:14 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:50:14 +0200
commitad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4 (patch)
treedcc7dd2ed76fd0900944c07776fcbdbcd665c020 /library/multithreading.cpp
parent1.5 (diff)
downloadFreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.gz
FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.bz2
FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.zip
1.6
Diffstat (limited to 'library/multithreading.cpp')
-rw-r--r--library/multithreading.cpp8
1 files changed, 5 insertions, 3 deletions
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;
};
bgstack15