Skip to content

Commit

Permalink
Merge pull request #189 from gureedo/sync_patch
Browse files Browse the repository at this point in the history
allow sync policy for future then continuation (fix #111)
  • Loading branch information
viboes authored Dec 21, 2017
2 parents 5141ade + 609d1a7 commit a0c23a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/boost/thread/future.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4956,6 +4956,10 @@ namespace detail {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
} else if (underlying_cast<int>(policy) & int(launch::sync)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
} else if (underlying_cast<int>(policy) & int(launch::executor)) {
assert(this->future_->get_executor());
Expand All @@ -4976,6 +4980,10 @@ namespace detail {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
} else if (underlying_cast<int>(policy_) & int(launch::sync)) {
return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
lock, boost::move(*this), boost::forward<F>(func)
)));
#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
} else if (underlying_cast<int>(policy_) & int(launch::executor)) {
assert(this->future_->get_executor());
Expand Down

0 comments on commit a0c23a6

Please sign in to comment.