|
C++ Actor Framework 1.0.0
|
A cooperatively scheduled, event-based actor implementation. More...
#include <event_based_actor.hpp>
Public Types | |
| using | signatures = none_t |
Required by spawn for type deduction. | |
| using | behavior_type = behavior |
Required by spawn for type deduction. | |
| using | handle_type = actor |
Public Member Functions | |
| event_based_actor (actor_config &cfg) | |
| void | initialize () override |
| template<class... Args> | |
| auto | mail (Args &&... args) |
| Starts a new message. | |
| template<class T , class... Ts> | |
| void | become (T &&arg, Ts &&... args) |
| Changes the behavior of this actor. | |
| void | unbecome () |
| Removes the last added behavior. | |
Protected Member Functions | |
| virtual behavior | make_behavior () |
| Returns the initial actor behavior. | |
A cooperatively scheduled, event-based actor implementation.
This is the recommended base class for user-defined actors.
| void caf::event_based_actor::unbecome | ( | ) |
Removes the last added behavior.
Terminates the actor if there are no behaviors left.