9#include "rotor/supervisor.h"
10#include "rotor/ev/export.h"
11#include "rotor/ev/supervisor_config_ev.h"
12#include "rotor/ev/system_context_ev.h"
13#include "rotor/system_context.h"
16#include <unordered_map>
66 void shutdown() noexcept override;
68 void shutdown_finish() noexcept override;
71 inline struct ev_loop *get_loop() noexcept {
return loop; }
74 template <
typename T>
auto &
access() noexcept;
81 static
void async_cb(EV_P_ ev_async *w,
int revents) noexcept;
93 virtual
void on_async() noexcept;
102 ev_async async_watcher;
105 ev_tstamp poll_duration;
110 friend struct supervisor_ev_shutdown_t;
113 void move_inbound_queue() noexcept;
Basic namespace for all rotor functionalities.
Definition rotor.hpp:21
intrusive_ptr_t< message_base_t > message_ptr_t
intrusive pointer for message
Definition message.h:118
std::size_t request_id_t
timer identifier type in the scope of the actor
Definition forward.hpp:34
boost::intrusive_ptr< T > intrusive_ptr_t
alias for intrusive pointer
Definition arc.hpp:27
CRTP supervisor ev config builder.
Definition supervisor_config_ev.h:30
libev supervisor config, which holds a pointer to the ev event loop and a loop ownership flag
Definition supervisor_config_ev.h:19
inheritance of ev_timer, which holds rotor timer_id
Definition supervisor_ev.h:45
supervisor_ptr_t sup
intrusive pointer to the supervisor
Definition supervisor_ev.h:54
intrusive_ptr_t< supervisor_ev_t > supervisor_ptr_t
intrusive pointer to ev supervisor (type)
Definition supervisor_ev.h:48
timer_handler_base_t * handler
non-owning pointer to timer handler
Definition supervisor_ev.h:51
delivers rotor-messages on top of libev event loop
Definition supervisor_ev.h:35
supervisor_ev_t(supervisor_config_ev_t &config)
constructs new supervisor from ev supervisor config
std::unordered_map< request_id_t, timer_ptr_t > timers_map_t
a type for mapping timer_id to timer pointer
Definition supervisor_ev.h:78
void start() noexcept override
thread-safe version of do_process
auto & access() noexcept
generic non-public fields accessor
virtual void do_initialize(system_context_t *ctx) noexcept override
early actor initialization (pre-initialization)
std::unique_ptr< timer_t > timer_ptr_t
an alias for unique pointer, holding timer_t
Definition supervisor_ev.h:58
supervisor is responsible for managing actors (workers) lifetime
Definition supervisor.h:69
The system context holds root supervisor_t (intrusive pointer) and may be loop-related details in der...
Definition system_context.h:32
Base class for timer handler.
Definition timer_handler.hpp:17