MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / async

Function async

extern/boost/boost/thread/future.hpp:3867–3892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3865#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
3866 template <class R, class... ArgTypes>
3867 BOOST_THREAD_FUTURE<R>
3868 async(launch policy, R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) {
3869 typedef R(*F)(BOOST_THREAD_FWD_REF(ArgTypes)...);
3870 typedef detail::invoker<typename decay<F>::type, typename decay<ArgTypes>::type...> BF;
3871 typedef typename BF::result_type Rp;
3872
3873 if (underlying_cast<int>(policy) & int(launch::async)) {
3874 return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_async_shared_state<Rp>(
3875 BF(
3876 f
3877 , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
3878 )
3879 ));
3880 } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
3881 return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_deferred_shared_state<Rp>(
3882 BF(
3883 f
3884 , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
3885 )
3886 ));
3887 } else {
3888 std::terminate();
3889 //BOOST_THREAD_FUTURE<R> ret;
3890 //return ::boost::move(ret);
3891 }
3892 }
3893
3894#else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
3895

Callers 1

future.hppFile · 0.85

Calls 6

decay_copyFunction · 0.85
get_futureMethod · 0.80
threadFunction · 0.50
moveFunction · 0.50
set_asyncMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected