Loading...
Searching...
No Matches
caf::scheduler::coordinator< Policy > Class Template Reference

Policy-based implementation of the abstract coordinator base class. More...

`#include <coordinator.hpp>`

Inheritance diagram for caf::scheduler::coordinator< Policy >:

## Public Types

using | super = abstract_coordinator
using | policy_data = typename Policy::coordinator_data
using | worker_type = worker<Policy>
Public Types inherited from caf::scheduler::abstract_coordinator
enum | utility_actor_id : size_t { printer_id , max_id }
Public Types inherited from caf::actor_system::module
enum | id_t { scheduler , middleman , opencl_manager , openssl_manager , network_manager , num_ids }

## Public Member Functions

| coordinator (actor_system &sys)
worker_type * | worker_by_id (size_t x)
policy_data & | data ()
Public Member Functions inherited from caf::scheduler::abstract_coordinator
| abstract_coordinator (actor_system &sys)
actor | printer () const
| Returns a handle to the central printing actor.
size_t | num_utility_actors () const
| Returns the number of utility actors.
actor_system & | system ()
const actor_system_config & | config () const
size_t | max_throughput () const
size_t | num_workers () const
virtual bool | detaches_utility_actors () const
| Returns true if this scheduler detaches its utility actors.
void | init (actor_system_config &cfg) override
| Allows the module to change the configuration of the actor system during startup.
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
const char * | name () const noexcept
| Returns the human-redable name of the module.

## Static Public Member Functions

static actor_system::module * | make (actor_system &sys, detail::type_list<>)
Static Public Member Functions inherited from caf::scheduler::abstract_coordinator
static void | cleanup_and_release (resumable *)

## Protected Member Functions

void | start () override
| Starts any background threads needed by the module.
void | stop () override
| Stops all background threads of the module.
void | enqueue (resumable *ptr) override
| Puts what into the queue of a randomly chosen worker.
detail::thread_safe_actor_clock & | clock () noexcept override
Protected Member Functions inherited from caf::scheduler::abstract_coordinator
void | stop_actors ()

## Additional Inherited Members

Protected Attributes inherited from caf::scheduler::abstract_coordinator
std::atomic< size_t > | next_worker_
| ID of the worker receiving the next enqueue (round-robin dispatch).
size_t | max_throughput_
| Number of messages each actor is allowed to consume per resume.
size_t | num_workers_
| Configured number of workers.
std::array< actor, max_id > | utility_actors_
| Background workers, e.g., printer.
actor_system & | system_
| Reference to the host system.

## Detailed Description

template<class Policy>
class caf::scheduler::coordinator< Policy >

Policy-based implementation of the abstract coordinator base class.

## Member Function Documentation

## clock()

template<class Policy>

detail::thread_safe_actor_clock & caf::scheduler::coordinator< Policy >::clock | ( |  | ) |

override protected virtual noexcept

Implements caf::scheduler::abstract_coordinator.

## enqueue()

template<class Policy>

void caf::scheduler::coordinator< Policy >::enqueue | ( | resumable * | what | ) |

override protected virtual

Puts what into the queue of a randomly chosen worker.

Implements caf::scheduler::abstract_coordinator.

## start()

template<class Policy>

void caf::scheduler::coordinator< Policy >::start | ( |  | ) |

override protected virtual

Starts any background threads needed by the module.

Reimplemented from caf::scheduler::abstract_coordinator.

Reimplemented in caf::scheduler::profiled_coordinator< Policy >, and caf::scheduler::profiled_coordinator< profiled< Policy > >.

## stop()

template<class Policy>

void caf::scheduler::coordinator< Policy >::stop | ( |  | ) |

override protected virtual

Stops all background threads of the module.

Implements caf::actor_system::module.

Reimplemented in caf::scheduler::profiled_coordinator< Policy >, and caf::scheduler::profiled_coordinator< profiled< Policy > >.

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

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/scheduler/coordinator.hpp