|
| EventLoop (std::string name="eventloop", int nthreads=0, bool spawnOnOverload=true) |
| Creates a group of threads running event loops. More...
|
|
| EventLoop (std::string name, int nthreads, int minThreads, int maxThreads, bool spawnOnOverload) |
|
| ~EventLoop () override |
| Default destructor. More...
|
|
bool | isInThisContext () const override |
| Checks if the current thread is one of the event loop threads. More...
|
|
void | start (int threadCount=0) |
| Starts the event loop. Does nothing if already started. More...
|
|
void | join () |
| Waits for all threads of the pool to terminate. More...
|
|
void | stop () |
| Stops all running threads. Does nothing if already stopped. More...
|
|
void | setEmergencyCallback (boost::function< void()> cb) |
| Sets callback to be called in case of a deadlock detection. More...
|
|
void | setMinThreads (unsigned int min) |
| Sets the minimum number of threads in the pool. More...
|
|
void | setMaxThreads (unsigned int max) |
| Sets the maximum number of threads in the pool. More...
|
|
void * | nativeHandle () |
| Internal function. More...
|
|
void | post (const boost::function< void()> &callback, uint64_t usDelay) |
| Similar to async() but without cancelation or notification. More...
|
|
void | post (const boost::function< void()> &callback, qi::Duration delay) |
|
void | post (const boost::function< void()> &callback, qi::SteadyClockTimePoint timepoint) |
|
Future< void > | monitorEventLoop (EventLoop *helper, uint64_t maxUsDelay) |
| Monitors event loop to detect deadlocks. More...
|
|
|
template<typename R > |
Future< R > | async (const boost::function< R()> &callback, uint64_t usDelay) |
| Calls given function once after given delay in microseconds. More...
|
|
Future< void > | async (const boost::function< void()> &callback, uint64_t usDelay) |
|
Future< void > | async (const boost::function< void()> &callback, qi::Duration delay) override |
|
Future< void > | async (const boost::function< void()> &callback, qi::SteadyClockTimePoint timepoint) override |
|
virtual | ~ExecutionContext () |
|
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)) |
|
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) |
|
Class to handle eventloop. .
Definition at line 37 of file eventloop.hpp.