C++ Actor Framework 0.18
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
caf::execution_unit Class Referenceabstract

Identifies an execution unit, e.g., a worker thread of the scheduler. More...

#include <execution_unit.hpp>

Inheritance diagram for caf::execution_unit:
caf::io::network::multiplexer caf::scheduler::worker< Policy > caf::scoped_execution_unit

Public Member Functions

 execution_unit (actor_system *sys)
 
 execution_unit (execution_unit &&)=default
 
execution_unitoperator= (execution_unit &&)=default
 
 execution_unit (const execution_unit &)=default
 
execution_unitoperator= (const execution_unit &)=default
 
virtual void exec_later (resumable *ptr)=0
 Enqueues ptr to the job list of the execution unit.
 
actor_systemsystem () const
 Returns the enclosing actor system.
 
proxy_registryproxy_registry_ptr ()
 Returns a pointer to the proxy factory currently associated to this unit.
 
void proxy_registry_ptr (proxy_registry *ptr)
 Associated a new proxy factory to this unit.
 

Protected Attributes

actor_systemsystem_ = nullptr
 
proxy_registryproxies_ = nullptr
 

Detailed Description

Identifies an execution unit, e.g., a worker thread of the scheduler.

By querying its execution unit, an actor can access other context information.

Member Function Documentation

◆ exec_later()

virtual void caf::execution_unit::exec_later ( resumable ptr)
pure virtual

Enqueues ptr to the job list of the execution unit.

Warning
Must only be called from a resumable currently executed by this execution unit.

Implemented in caf::scoped_execution_unit.

◆ system()

actor_system & caf::execution_unit::system ( ) const

Returns the enclosing actor system.

Warning
Must be set before the execution unit calls resume on an actor.

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