7 #ifndef _QI_EXECUTION_CONTEXT_HPP_
8 #define _QI_EXECUTION_CONTEXT_HPP_
10 #include <boost/function.hpp>
26 virtual void post(
const boost::function<
void()>& callback) = 0;
35 typename boost::disable_if<boost::is_same<R, void>,
37 async(
const boost::function<R()>& callback,
41 typename boost::disable_if<boost::is_same<R, void>,
46 virtual bool isInThisContext() = 0;
76 catch (
const std::exception& e)
95 typename boost::disable_if<boost::is_same<R, void>,
102 detail::call_and_set<R>, promise, callback)),
112 template <
typename R>
113 typename boost::disable_if<boost::is_same<R, void>,
120 detail::call_and_set<R>, promise, callback)),
void setup(boost::function< void(qi::Promise< T >)> cancelCallback, FutureCallbackType async=FutureCallbackType_Async)
The future has been canceled.
boost::function< RF > bind(const AF &fun,...)
boost::chrono::duration< int64_t, boost::nano > Duration
Convenience typedefs.
void setup(boost::function< void(qi::Promise< T >)> cancelCallback, FutureCallbackType async=FutureCallbackType_Async)
virtual qi::Future< void > async(const boost::function< void()> &callback, qi::SteadyClockTimePoint tp)=0
call a callback asynchronously to be executed on tp
void setError(const std::string &msg)
dll import/export and compiler message
void connect(const AF &fun, FutureCallbackType type=FutureCallbackType_Async)
Future< T > future() const
Get a future linked to this promise. Can be called multiple times.
void check_canceled(qi::Future< void > f, qi::Promise< R > p)
Future< R > async(boost::function< R()> callback, uint64_t usDelay=0)
void call_and_set(qi::Promise< R > p, boost::function< R()> f)
FutureState wait(int msecs=FutureTimeout_Infinite) const
void setValue(const ValueType &value)
virtual ~ExecutionContext()
SteadyClock::time_point SteadyClockTimePoint
Steady clock time point.
boost::shared_ptr< detail::FutureBaseTyped< T > > impl()