libqi-api
2.8.7.4
|
#include <executioncontext.hpp>
Public Member Functions | |
virtual | ~ExecutionContext () |
virtual qi::Future< void > | async (const boost::function< void()> &callback, qi::SteadyClockTimePoint tp)=0 |
virtual qi::Future< void > | async (const boost::function< void()> &callback, qi::Duration delay)=0 |
template<typename R > | |
boost::disable_if < std::is_same< R, void > , qi::Future< R > >::type | async (const boost::function< R()> &callback, qi::Duration delay) |
template<typename R > | |
boost::disable_if < std::is_same< R, void > , qi::Future< R > >::type | async (const boost::function< R()> &callback, qi::SteadyClockTimePoint tp) |
template<typename R > | |
qi::Future< R > | async (const detail::Function< R()> &callback) |
template<typename F > | |
void | post (F &&callback, ExecutionOptions options=defaultExecutionOptions()) |
post a callback to be executed as soon as possible More... | |
template<typename F , typename R = ka::Decay<decltype(std::declval<F>()())>> | |
qi::Future< R > | asyncAt (F &&callback, qi::SteadyClockTimePoint tp, ExecutionOptions options=defaultExecutionOptions()) |
call a callback asynchronously to be executed on tp More... | |
template<typename F , typename R = ka::Decay<decltype(std::declval<F>()())>> | |
qi::Future< R > | asyncDelay (F &&callback, qi::Duration delay, ExecutionOptions options=defaultExecutionOptions()) |
call a callback asynchronously to be executed in delay More... | |
template<typename F > | |
auto | async (F &&callback, ExecutionOptions options=defaultExecutionOptions()) -> decltype(asyncDelay(std::forward< F >(callback), qi::Duration(0), options)) |
virtual bool | isInThisContext () const =0 |
return true if the current thread is in this context More... | |
template<typename F , typename R > | |
Future< R > | asyncAt (F &&callback, qi::SteadyClockTimePoint tp, ExecutionOptions options) |
template<typename F , typename R > | |
Future< R > | asyncDelay (F &&callback, qi::Duration delay, ExecutionOptions options) |
Protected Member Functions | |
virtual void | postImpl (boost::function< void()> callback, ExecutionOptions options)=0 |
virtual qi::Future< void > | asyncAtImpl (boost::function< void()> cb, qi::SteadyClockTimePoint tp, ExecutionOptions options)=0 |
virtual qi::Future< void > | asyncDelayImpl (boost::function< void()> cb, qi::Duration delay, ExecutionOptions options)=0 |
Definition at line 63 of file executioncontext.hpp.
|
inlinevirtual |
Definition at line 66 of file executioncontext.hpp.
|
pure virtual |
call a callback asynchronously to be executed on tp
Implemented in qi::Strand, qi::EventLoop, and qi::StrandPrivate.
|
pure virtual |
call a callback asynchronously to be executed in delay
Implemented in qi::Strand, qi::EventLoop, and qi::StrandPrivate.
boost::disable_if< std::is_same< R, void >, qi::Future< R > >::type qi::ExecutionContext::async | ( | const boost::function< R()> & | callback, |
qi::Duration | delay | ||
) |
call a callback asynchronously to be executed in delay
Definition at line 194 of file executioncontext.hpp.
boost::disable_if< std::is_same< R, void >, qi::Future< R > >::type qi::ExecutionContext::async | ( | const boost::function< R()> & | callback, |
qi::SteadyClockTimePoint | tp | ||
) |
call a callback asynchronously to be executed on tp
Definition at line 211 of file executioncontext.hpp.
|
inline |
Definition at line 94 of file executioncontext.hpp.
|
inline |
Definition at line 112 of file executioncontext.hpp.
qi::Future<R> qi::ExecutionContext::asyncAt | ( | F && | callback, |
qi::SteadyClockTimePoint | tp, | ||
ExecutionOptions | options = defaultExecutionOptions() |
||
) |
call a callback asynchronously to be executed on tp
Future<R> qi::ExecutionContext::asyncAt | ( | F && | callback, |
qi::SteadyClockTimePoint | tp, | ||
ExecutionOptions | options | ||
) |
Definition at line 248 of file executioncontext.hpp.
|
protectedpure virtual |
Implemented in qi::StrandPrivate.
qi::Future<R> qi::ExecutionContext::asyncDelay | ( | F && | callback, |
qi::Duration | delay, | ||
ExecutionOptions | options = defaultExecutionOptions() |
||
) |
call a callback asynchronously to be executed in delay
Future<R> qi::ExecutionContext::asyncDelay | ( | F && | callback, |
qi::Duration | delay, | ||
ExecutionOptions | options | ||
) |
Definition at line 260 of file executioncontext.hpp.
|
protectedpure virtual |
Implemented in qi::StrandPrivate.
|
pure virtual |
return true if the current thread is in this context
Implemented in qi::Strand, qi::StrandPrivate, and qi::EventLoop.
void qi::ExecutionContext::post | ( | F && | callback, |
ExecutionOptions | options = defaultExecutionOptions() |
||
) |
post a callback to be executed as soon as possible
Definition at line 226 of file executioncontext.hpp.
|
protectedpure virtual |
Implemented in qi::StrandPrivate.