C++ Actor Framework 1.0.0
|
Represents a single execution context with an internal event-loop to schedule action objects. More...
#include <execution_context.hpp>
Public Member Functions | |
virtual void | ref_execution_context () const noexcept=0 |
Increases the reference count of the execution_context. | |
virtual void | deref_execution_context () const noexcept=0 |
Decreases the reference count of the execution context and destroys the object if necessary. | |
virtual void | schedule (action what)=0 |
Schedules what to run on the event loop of the execution context. | |
template<class F > | |
void | schedule_fn (F &&what) |
Schedules what to run on the event loop of the execution context. | |
virtual void | watch (disposable what)=0 |
Asks the coordinator to keep its event loop running until what becomes disposed since it depends on external events or produces events that are visible to outside observers. | |
Related Symbols | |
(Note that these are not member symbols.) | |
using | execution_context_ptr = intrusive_ptr<execution_context> |
void | intrusive_ptr_add_ref (const execution_context *ptr) noexcept |
void | intrusive_ptr_release (const execution_context *ptr) noexcept |
Represents a single execution context with an internal event-loop to schedule action objects.
|
pure virtual |
Schedules what
to run on the event loop of the execution context.
This member function may get called from external sources or threads. @thread-safe
Implemented in caf::net::multiplexer.
void caf::async::execution_context::schedule_fn | ( | F && | what | ) |
Schedules what
to run on the event loop of the execution context.
This member function may get called from external sources or threads. @thread-safe
|
pure virtual |
Asks the coordinator to keep its event loop running until what
becomes disposed since it depends on external events or produces events that are visible to outside observers.
Must be called from within the event loop of the execution context.