21 typename std::enable_if<detail::IsAsyncBind<F>::value,
typename std::decay<decltype(cb())>::type>::type;
25 typename std::enable_if<!detail::IsAsyncBind<F>::value,
30 typename std::enable_if<detail::IsAsyncBind<F>::value,
typename std::decay<decltype(cb())>::type>::type;
34 typename std::enable_if<!detail::IsAsyncBind<F>::value,
63 inline Future<R>
async(boost::function<R()> callback,
uint64_t usDelay);
75 inline Future<R>
async(detail::Function<R()> callback);
78 template<
typename R,
typename Func,
typename ArgTrack>
82 #define genCall(n, ATYPEDECL, ATYPES, ADECL, AUSE, comma)\
83 template <typename R, typename AF, typename ARG0 comma ATYPEDECL>\
84 inline QI_API_DEPRECATED Future<R> async(const AF& fun, const ARG0& arg0 comma ADECL, qi::Duration delay = qi::Duration(0))\
86 template <typename R, typename AF, typename ARG0 comma ATYPEDECL>\
87 inline QI_API_DEPRECATED Future<R> async(const AF& fun, const ARG0& arg0 comma ADECL, qi::SteadyClockTimePoint timepoint)\
96 template<
typename T,
typename Duration>
102 #endif // _QI_ASYNC_HPP
auto asyncDelay(F &&callback, qi::Duration delay) -> decltype(detail::asyncMaybeActor(std::forward< F >(callback), delay))
SteadyClock::time_point SteadyClockTimePoint
Steady clock time point.
auto asyncMaybeActor(F &&cb, qi::Duration delay) -> typename std::enable_if< detail::IsAsyncBind< F >::value, typename std::decay< decltype(cb())>::type >::type
#define QI_API_DEPRECATED_MSG(msg__)
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
auto async(F &&callback) -> decltype(asyncDelay(std::forward< F >(callback), qi::Duration(0)))
EventLoop * getEventLoop()
Returns the global eventloop, created on demand on first call.
auto asyncAt(F &&callback, qi::SteadyClockTimePoint timepoint) -> decltype(qi::getEventLoop() ->asyncAt(std::forward< F >(callback), timepoint))
qi::Future< R > asyncAt(F &&callback, qi::SteadyClockTimePoint tp, ExecutionOptions options=defaultExecutionOptions())
call a callback asynchronously to be executed on tp
#define QI_API_DEPRECATED
Compiler flags to mark a function as deprecated. It will generate a compiler warning.
Future< T > cancelOnTimeout(Future< T > fut, Duration timeout)