summaryrefslogtreecommitdiff
path: root/zen/thread.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:07 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:07 +0200
commit88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170 (patch)
treec6c5babb49b90293380106b81ae5c446959ac70f /zen/thread.h
parent5.3 (diff)
downloadFreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.gz
FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.tar.bz2
FreeFileSync-88a8b528e20013c0aa3cc6bcd9659b0b5ddd9170.zip
5.4
Diffstat (limited to 'zen/thread.h')
-rw-r--r--zen/thread.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/thread.h b/zen/thread.h
index ba9a46e2..3fb73e70 100644
--- a/zen/thread.h
+++ b/zen/thread.h
@@ -8,8 +8,8 @@
#define BOOST_THREAD_WRAP_H
//temporary solution until C++11 thread becomes fully available
-#include <vector>
#include <memory>
+#include "fixed_list.h"
#ifdef __MINGW32__
#pragma GCC diagnostic push
@@ -63,7 +63,7 @@ public:
private:
class AsyncResult;
- std::vector<boost::thread> workload;
+ FixedList<boost::thread> workload; //note: we cannot use std::vector<boost::thread>: compiler error on GCC 4.7, probably a boost screw-up
std::shared_ptr<AsyncResult> result;
};
@@ -180,10 +180,10 @@ template <class Fun> inline
void RunUntilFirstHit<T>::addJob(Fun f) //f must return a std::unique_ptr<T> containing a value on success
{
auto result2 = result; //VC11: this is ridiculous!!!
- workload.push_back(boost::thread([result2, f]
+ workload.emplace_back([result2, f]
{
result2->reportFinished(f());
- }));
+ });
}
bgstack15