2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-13 12:52:11 +00:00

fix the move(w) on scheduler and store copies of the Executors.

This commit is contained in:
Vicente J. Botet Escriba
2015-02-28 16:29:00 +01:00
parent 6e5a46c16f
commit df14c8ac18
3 changed files with 7 additions and 9 deletions

View File

@@ -38,7 +38,7 @@ namespace boost
}
private:
Executor& ex;
Executor ex;
Function funct;
};
@@ -103,7 +103,7 @@ namespace boost
private:
Scheduler sch;
Executor& ex;
Executor ex;
typename clock::time_point tp;
bool is_closed;
};
@@ -153,7 +153,7 @@ namespace boost
private:
Scheduler sch;
Executor &ex;
Executor ex;
}; //end class
/// Wraps a reference to a @c Scheduler providing an @c Executor that
@@ -276,12 +276,12 @@ namespace boost
void submit_at(work w, const time_point& tp)
{
return pimpl->submit_at(w, tp);
return pimpl->submit_at(boost::move(w), tp);
}
void submit_after(work w, const duration& d)
{
return pimpl->submit_after(w, d);
return pimpl->submit_after(boost::move(w), d);
}
template <class Ex>

View File

@@ -18,8 +18,8 @@ namespace boost
typedef detail::nullary_function<void()> work;
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//typedef detail::nullary_function<void()> work_pq;
typedef csbl::function<void()> work_pq;
typedef detail::nullary_function<void()> work_pq;
//typedef csbl::function<void()> work_pq;
#else
typedef csbl::function<void()> work_pq;
#endif