diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:55:48 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:55:48 +0200 |
commit | daea231de0ae28fc8343f29f09d0457cc0591461 (patch) | |
tree | a1d572442d2c903e40741a859ad47c8b0d740969 /library/multithreading.cpp | |
parent | 1.13 (diff) | |
download | FreeFileSync-daea231de0ae28fc8343f29f09d0457cc0591461.tar.gz FreeFileSync-daea231de0ae28fc8343f29f09d0457cc0591461.tar.bz2 FreeFileSync-daea231de0ae28fc8343f29f09d0457cc0591461.zip |
1.14
Diffstat (limited to 'library/multithreading.cpp')
-rw-r--r-- | library/multithreading.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/library/multithreading.cpp b/library/multithreading.cpp index 753e6651..bf5918d2 100644 --- a/library/multithreading.cpp +++ b/library/multithreading.cpp @@ -1,36 +1,9 @@ #include "multithreading.h" #include <wx/utils.h> -#include <wx/app.h> -#include <wx/timer.h> -//#include "windows.h" +//#include <wx/msw/wrapwin.h> //includes "windows.h" //MessageBox(0, "hi", "", 0); -void updateUiNow() -{ - //process UI events and prevent application from "not responding" -> NO performance issue! - wxTheApp->Yield(); - - // while (wxTheApp->Pending()) - // wxTheApp->Dispatch(); -} - - -bool updateUiIsAllowed() -{ - static wxLongLong lastExec = 0; - - wxLongLong newExec = wxGetLocalTimeMillis(); - - if (newExec - lastExec >= UI_UPDATE_INTERVAL) //perform ui updates not more often than necessary - { - lastExec = newExec; - return true; - } - return false; -} - - /*choreography: ------------- --------------- @@ -97,7 +70,7 @@ public: threadHandler->readyToReceiveResult.Lock(); threadHandler->receivingResult.Signal(); // kind of a double notice that work is completed - threadHandler->workDone = true; // workaround for wxCondition bug (wxWidgets v2.8.9, signal might geht lost) + threadHandler->workDone = true; // Workaround for wxWidgets: bug in wxCondition (wxWidgets v2.8.9, signal might geht lost) threadHandler->readyToReceiveResult.Unlock(); } |