diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /zen/thread.h | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'zen/thread.h')
-rw-r--r-- | zen/thread.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/zen/thread.h b/zen/thread.h index 638d9474..76596513 100644 --- a/zen/thread.h +++ b/zen/thread.h @@ -128,7 +128,7 @@ public: void reportFinished(std::unique_ptr<T>&& result) { { - boost::unique_lock<boost::mutex> dummy(lockResult); + boost::lock_guard<boost::mutex> dummy(lockResult); ++jobsFinished; if (!result_) result_ = std::move(result); @@ -149,7 +149,6 @@ public: std::unique_ptr<T> getResult(size_t jobsTotal) { boost::unique_lock<boost::mutex> dummy(lockResult); - while (!jobDone(jobsTotal)) conditionJobDone.timed_wait(dummy, boost::posix_time::milliseconds(50)); //interruption point! |