|
MapLibre Native Core
|
#include <established_actor.hpp>
Public Member Functions | |
| template<typename U = Object, class... Args, typename std::enable_if_t< std::is_constructible_v< U, Args... >||std::is_constructible_v< U, ActorRef< U >, Args... > > * = nullptr> | |
| EstablishedActor (Scheduler &scheduler, AspiringActor< Object > &parent_, Args &&... args) | |
| template<class ArgsTuple , std::size_t ArgCount = std::tuple_size<std::decay_t<ArgsTuple>>::value> | |
| EstablishedActor (Scheduler &scheduler, AspiringActor< Object > &parent_, ArgsTuple &&args) | |
| EstablishedActor (const EstablishedActor &)=delete | |
| ~EstablishedActor () | |
An EstablishedActor<O> is one half of the pair of types that comprise an actor (see Actor<O>), the other half being AspiringActor<O>. It is responsible for managing the lifetime of the target object O and the open/closed state of the parent's mailbox.
The O object's lifetime is contained by that of its owning EstablishedActor<O>: the EstablishedActor constructor executes the O constructor via "placement new", constructing it at the address provided by the parent AspiringActor, and the ~EstablishedActor destructor similarly executes the ~O destructor (after closing the mailbox). EstablishedActor should therefore live entirely on the thread intended to own O.
Definition at line 27 of file established_actor.hpp.
|
inline |
Definition at line 34 of file established_actor.hpp.
|
inline |
Definition at line 43 of file established_actor.hpp.
|
delete |
|
inline |
Definition at line 51 of file established_actor.hpp.