libcaf  0.15.3
Public Types | Public Member Functions | List of all members
caf::scheduler::worker< Policy > Class Template Reference

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

#include <worker.hpp>

Inheritance diagram for caf::scheduler::worker< Policy >:
caf::execution_unit

Public Types

using job_ptr = resumable *
 
using coordinator_ptr = coordinator< Policy > *
 
using policy_data = typename Policy::worker_data
 

Public Member Functions

 worker (size_t worker_id, coordinator_ptr worker_parent, size_t throughput)
 
void start ()
 
 worker (const worker &)=delete
 
workeroperator= (const worker &)=delete
 
void external_enqueue (job_ptr job)
 Enqueues a new job to the worker's queue from an external source, i.e., from any other thread. More...
 
void exec_later (job_ptr job) override
 Enqueues a new job to the worker's queue from an internal source, i.e., a job that is currently executed by this worker. More...
 
coordinator_ptr parent ()
 
size_t id () const
 
std::thread & get_thread ()
 
actor_id id_of (resumable *ptr)
 
policy_data & data ()
 
size_t max_throughput ()
 
- Public Member Functions inherited from caf::execution_unit
 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.
 

Additional Inherited Members

- Protected Attributes inherited from caf::execution_unit
actor_systemsystem_
 
proxy_registryproxies_
 

Detailed Description

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

Policy-based implementation of the abstract worker base class.

Member Function Documentation

template<class Policy >
void caf::scheduler::worker< Policy >::exec_later ( job_ptr  job)
override

Enqueues a new job to the worker's queue from an internal source, i.e., a job that is currently executed by this worker.

Warning
Must not be called from other threads.
template<class Policy >
void caf::scheduler::worker< Policy >::external_enqueue ( job_ptr  job)

Enqueues a new job to the worker's queue from an external source, i.e., from any other thread.


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