libqi-api  2.4.3.28
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::ExecutionContext Class Referenceabstract

#include <executioncontext.hpp>

Public Member Functions

virtual ~ExecutionContext ()
 
virtual void post (const boost::function< void()> &callback)=0
 post a callback to be executed as soon as possible More...
 
virtual qi::Future< void > async (const boost::function< void()> &callback, qi::SteadyClockTimePoint tp)=0
 call a callback asynchronously to be executed on tp More...
 
virtual qi::Future< void > async (const boost::function< void()> &callback, qi::Duration delay=qi::Duration(0))=0
 call a callback asynchronously to be executed in delay More...
 
template<typename R >
boost::disable_if
< boost::is_same< R, void >
, qi::Future< R > >::type 
async (const boost::function< R()> &callback, qi::Duration delay=qi::Duration(0))
 call a callback asynchronously to be executed in delay More...
 
template<typename R >
boost::disable_if
< boost::is_same< R, void >
, qi::Future< R > >::type 
async (const boost::function< R()> &callback, qi::SteadyClockTimePoint tp)
 call a callback asynchronously to be executed on tp More...
 
virtual bool isInThisContext ()=0
 return true if the current thread is in this context More...
 

Detailed Description

Definition at line 20 of file executioncontext.hpp.

Constructor & Destructor Documentation

virtual qi::ExecutionContext::~ExecutionContext ( )
inlinevirtual

Definition at line 23 of file executioncontext.hpp.

Member Function Documentation

virtual qi::Future<void> qi::ExecutionContext::async ( const boost::function< void()> &  callback,
qi::SteadyClockTimePoint  tp 
)
pure virtual

call a callback asynchronously to be executed on tp

Implemented in qi::EventLoop, and qi::Strand.

virtual qi::Future<void> qi::ExecutionContext::async ( const boost::function< void()> &  callback,
qi::Duration  delay = qi::Duration(0) 
)
pure virtual

call a callback asynchronously to be executed in delay

Implemented in qi::EventLoop, and qi::Strand.

template<typename R >
boost::disable_if< boost::is_same< R, void >, qi::Future< R > >::type qi::ExecutionContext::async ( const boost::function< R()> &  callback,
qi::Duration  delay = qi::Duration(0) 
)

call a callback asynchronously to be executed in delay

Definition at line 97 of file executioncontext.hpp.

template<typename R >
boost::disable_if< boost::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 115 of file executioncontext.hpp.

virtual bool qi::ExecutionContext::isInThisContext ( )
pure virtual

return true if the current thread is in this context

Implemented in qi::EventLoop, and qi::Strand.

virtual void qi::ExecutionContext::post ( const boost::function< void()> &  callback)
pure virtual

post a callback to be executed as soon as possible

Implemented in qi::EventLoop, and qi::Strand.


The documentation for this class was generated from the following file: