#include <deque>
#include <atomic>
#include <qi/assert.hpp>
#include <qi/detail/executioncontext.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>
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); \
}
#define QI_API_DEPRECATED_MSG(msg__)
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
auto trackWithFallback(boost::function< void()> onFail, F &&f, Arg0 &&arg0) -> decltype(detail::BindTransform< Arg0 >::wrap(std::forward< Arg0 >(arg0), std::forward< F >(f), std::move(onFail)))
Definition at line 176 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 176 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 172 of file strand.hpp.