|
libqi-api
release-2.5.3-2016-11-18
|
#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) |
| post a callback to be executed as soon as possible More... | |
| template<typename F > | |
| auto | asyncAt (F &&callback, qi::SteadyClockTimePoint tp) -> qi::Future< typename std::decay< decltype(callback())>::type > |
| call a callback asynchronously to be executed on tp More... | |
| template<typename F > | |
| auto | asyncDelay (F &&callback, qi::Duration delay) -> qi::Future< typename std::decay< decltype(callback())>::type > |
| call a callback asynchronously to be executed in delay More... | |
| template<typename F > | |
| auto | async (F &&callback) -> decltype(asyncDelay(std::forward< F >(callback), qi::Duration(0))) |
| virtual bool | isInThisContext ()=0 |
| return true if the current thread is in this context More... | |
Protected Member Functions | |
| virtual void | postImpl (boost::function< void()> callback)=0 |
| virtual qi::Future< void > | asyncAtImpl (boost::function< void()> cb, qi::SteadyClockTimePoint tp)=0 |
| virtual qi::Future< void > | asyncDelayImpl (boost::function< void()> cb, qi::Duration delay)=0 |
Definition at line 40 of file executioncontext.hpp.
|
inlinevirtual |
Definition at line 43 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 164 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 181 of file executioncontext.hpp.
|
inline |
Definition at line 71 of file executioncontext.hpp.
|
inline |
Definition at line 88 of file executioncontext.hpp.
| auto qi::ExecutionContext::asyncAt | ( | F && | callback, |
| qi::SteadyClockTimePoint | tp | ||
| ) | -> qi::Future<typename std::decay<decltype(callback())>::type> |
call a callback asynchronously to be executed on tp
Definition at line 218 of file executioncontext.hpp.
|
protectedpure virtual |
Implemented in qi::StrandPrivate.
| auto qi::ExecutionContext::asyncDelay | ( | F && | callback, |
| qi::Duration | delay | ||
| ) | -> qi::Future<typename std::decay<decltype(callback())>::type> |
call a callback asynchronously to be executed in delay
Definition at line 232 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 | ) |
post a callback to be executed as soon as possible
Definition at line 196 of file executioncontext.hpp.
|
protectedpure virtual |
Implemented in qi::StrandPrivate.