#include <deque>
#include <atomic>
#include <memory>
#include <ka/functional.hpp>
#include <ka/mutablestore.hpp>
#include <qi/assert.hpp>
#include <qi/config.hpp>
#include <qi/detail/executioncontext.hpp>
#include <qi/detail/futureunwrap.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/type_traits/function_traits.hpp>
#include <qi/async.hpp>
Go to the source code of this file.
|
#define | _QI_STRAND_HPP_ |
|
#define | genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma) |
|
#define | typedefi(z, n, _) |
|
#define | placeholders(z, n, __) , BOOST_PP_CAT(_, BOOST_PP_INC(n)) |
|
#define | genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma) |
|
#define genCall |
( |
|
n, |
|
|
|
ATYPEDECL, |
|
|
|
ATYPES, |
|
|
|
ADECL, |
|
|
|
AUSE, |
|
|
|
comma |
|
) |
| |
Value:template <
typename T,
typename F,
typename ARG0 comma ATYPEDECL>
\
const F& func, const ARG0& arg0 comma ADECL, \
const boost::function<void()>& fallbackCb = boost::function<void()>()) \
{ \
boost::function<T> funcbind = qi::bind<T>(func, arg0 comma AUSE); \
fallbackCb, \
SchedulerHelper<boost::function_traits<T>::arity, T>::_scheduler( \
funcbind, this), \
arg0); \
}
auto trackWithFallback(boost::function< void()> onFail, F &&f, T &&toTrack) -> decltype(detail::BindTransform< T >::wrap(std::forward< T >(toTrack), std::forward< F >(f), std::move(onFail)))
#define QI_API_DEPRECATED_MSG(msg__)
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
Definition at line 286 of file strand.hpp.
#define genCall |
( |
|
n, |
|
|
|
ATYPEDECL, |
|
|
|
ATYPES, |
|
|
|
ADECL, |
|
|
|
AUSE, |
|
|
|
comma |
|
) |
| |
Value:template <typename T> \
struct SchedulerHelper<n, T> \
{ \
typedef typename boost::function_traits<T>::result_type R; \
static boost::function<T> _scheduler(const boost::function<T>& f, \
Strand* strand) \
{ \
return qi::bind<T>(&_asyncCall, strand, \
} \
const boost::function<T>& func comma \
ADECL) \
{ \
\
->async(
qi::bind<R()>(func comma AUSE)); \
} \
};
#define typedefi(z, n, _)
#define placeholders(z, n, __)
std::enable_if< std::is_function< RF >::value, boost::function< RF > >::type bind(AF &&fun, Arg0 &&arg0, Args &&...args)
Definition at line 286 of file strand.hpp.
#define placeholders |
( |
|
z, |
|
|
|
n, |
|
|
|
__ |
|
) |
| , BOOST_PP_CAT(_, BOOST_PP_INC(n)) |
#define typedefi |
( |
|
z, |
|
|
|
n, |
|
|
|
_ |
|
) |
| |
Value:typedef typename boost::function_traits<T>::BOOST_PP_CAT( \
BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type) BOOST_PP_CAT(P, n);
Definition at line 282 of file strand.hpp.