libcaf  0.15.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
caf::scheduler::abstract_coordinator Class Referenceabstract

A coordinator creates the workers, manages delayed sends and the central printer instance for aout. More...

#include <abstract_coordinator.hpp>

Inheritance diagram for caf::scheduler::abstract_coordinator:
caf::actor_system::module caf::scheduler::coordinator< Policy > caf::scheduler::test_coordinator caf::scheduler::profiled_coordinator< Policy >

Public Member Functions

 abstract_coordinator (actor_system &sys)
 
actor printer () const
 Returns a handle to the central printing actor.
 
virtual void enqueue (resumable *what)=0
 Puts what into the queue of a randomly chosen worker.
 
template<class Duration , class... Data>
void delayed_send (Duration rel_time, strong_actor_ptr from, strong_actor_ptr to, message_id mid, message data)
 
actor_systemsystem ()
 
size_t max_throughput () const
 
size_t num_workers () const
 
void start () override
 Starts any background threads needed by the module.
 
void init (actor_system_config &cfg) override
 Allows the module to change the configuration of the actor system during startup. More...
 
id_t id () const override
 Returns the identifier of this module.
 
void * subtype_ptr () override
 Returns a pointer to the subtype.
 
- Public Member Functions inherited from caf::actor_system::module
virtual void stop ()=0
 Stops all background threads of the module.
 

Static Public Member Functions

static void cleanup_and_release (resumable *)
 

Protected Member Functions

void stop_actors ()
 

Protected Attributes

std::atomic< size_t > next_worker_
 
size_t max_throughput_
 
size_t num_workers_
 
strong_actor_ptr timer_
 
strong_actor_ptr printer_
 
actor_systemsystem_
 

Additional Inherited Members

- Public Types inherited from caf::actor_system::module
enum  id_t {
  scheduler,
  middleman,
  opencl_manager,
  num_ids
}
 

Detailed Description

A coordinator creates the workers, manages delayed sends and the central printer instance for aout.

It also forwards sends from detached workers or non-actor threads to randomly chosen workers.

Member Function Documentation

void caf::scheduler::abstract_coordinator::init ( actor_system_config )
overridevirtual

Allows the module to change the configuration of the actor system during startup.

Implements caf::actor_system::module.

Reimplemented in caf::scheduler::profiled_coordinator< Policy >.


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