|
libcaf
0.14.4
|
An event-based actor with managed state. More...
#include <stateful_actor.hpp>
Inherits Base.
Public Member Functions | |
| template<class... Ts> | |
| stateful_actor (Ts &&...xs) | |
| void | on_exit () overridefinal |
| Destroys the state of this actor (no further overriding allowed). | |
| const char * | name () const overridefinal |
| void | save_state (serializer &sink, const unsigned int version) override |
| void | load_state (deserializer &source, const unsigned int version) override |
Public Attributes | |
| State & | state |
| A reference to the actor's state. | |
| State | state_ |
An event-based actor with managed state.
The state is constructed before make_behavior will get called and destroyed after the actor called quit. This state management brakes cycles and allows actors to automatically release ressources as soon as possible.
1.8.9.1