mirror of
https://github.com/edubart/otclient.git
synced 2025-12-18 14:47:11 +01:00
Try to fix compilation for gcc 4.6 [2]
This commit is contained in:
@@ -35,12 +35,12 @@ public:
|
||||
void stop();
|
||||
|
||||
template<class F>
|
||||
boost::unique_future<typename std::result_of<F()>::type> schedule(const F& task) {
|
||||
boost::shared_future<typename std::result_of<F()>::type> schedule(const F& task) {
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
auto prom = std::make_shared<boost::promise<typename std::result_of<F()>::type>>();
|
||||
m_tasks.push_back([=]() { prom->set_value(task()); });
|
||||
m_condition.notify_all();
|
||||
return prom->get_future();
|
||||
return prom->get_future().share();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user