libcaf  0.15.3
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 caf::io::network::asio_multiplexer

Public Member Functions

 execution_unit (actor_system *sys)
 
 execution_unit (execution_unit &&)=delete
 
 execution_unit (const execution_unit &)=delete
 
virtual void exec_later (resumable *ptr)=0
 Enqueues ptr to the job list of the execution unit. More...
 
actor_systemsystem () const
 Returns the enclosing actor system. More...
 
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_
 
proxy_registryproxies_
 

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

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::io::network::asio_multiplexer, and caf::scoped_execution_unit.

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: