C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::async::execution_context Class Referenceabstract

Represents a single execution context with an internal event-loop to schedule action objects. More...

#include <execution_context.hpp>

Inheritance diagram for caf::async::execution_context:
caf::flow::coordinator caf::net::multiplexer caf::net::socket_manager

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
 

Detailed Description

Represents a single execution context with an internal event-loop to schedule action objects.

Member Function Documentation

◆ schedule()

virtual void caf::async::execution_context::schedule ( action what)
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.

◆ schedule_fn()

template<class F >
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

◆ watch()

virtual void caf::async::execution_context::watch ( disposable what)
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.


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