CAF  0.17.2
Public Types | Public Member Functions | List of all members
caf::resumable Class Referenceabstract

A cooperatively executed task managed by one or more instances of execution_unit. More...

#include <resumable.hpp>

Inheritance diagram for caf::resumable:
caf::io::network::multiplexer::runnable caf::scheduled_actor caf::event_based_actor caf::io::abstract_broker caf::raw_event_based_actor caf::raw_event_based_actor caf::io::broker caf::io::basp_broker

Public Types

enum  resume_result {
 Denotes the state in which a resumable returned from its last call to resume.
enum  subtype_t {
 Denotes common subtypes of resumable. More...

Public Member Functions

virtual subtype_t subtype () const
 Returns a subtype hint for this object. More...
virtual resume_result resume (execution_unit *, size_t max_throughput)=0
 Resume any pending computation until it is either finished or needs to be re-scheduled later.
virtual void intrusive_ptr_add_ref_impl ()=0
 Add a strong reference count to this object.
virtual void intrusive_ptr_release_impl ()=0
 Remove a strong reference count from this object.

Detailed Description

A cooperatively executed task managed by one or more instances of execution_unit.

Note that this class is meant as mixin for reference counted object, i.e., the subclass is required to inherit from ref_counted at some point.

Member Enumeration Documentation

◆ subtype_t

Denotes common subtypes of resumable.


Identifies non-actors or blocking actors.


Identifies event-based, cooperatively scheduled actors.


Identifies broker, i.e., actors performing I/O.


Identifies tasks, usually one-shot callbacks.

Member Function Documentation

◆ subtype()

virtual subtype_t caf::resumable::subtype ( ) const

Returns a subtype hint for this object.

This allows an execution unit to limit processing to a specific set of resumables and delegate other subtypes to dedicated workers.

Reimplemented in caf::io::abstract_broker, caf::scheduled_actor, and caf::io::network::multiplexer::runnable.

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