Commit f81db0d3 authored by Dominik Charousset's avatar Dominik Charousset

Fix initialization order of actor_system

parent 50d010ca
......@@ -605,6 +605,9 @@ private:
/// Used to generate ascending actor IDs.
std::atomic<size_t> ids_;
/// Manages all metrics collected by the system.
telemetry::metric_registry metrics_;
/// Identifies this actor system in a distributed setting.
node_id node_;
......@@ -644,9 +647,6 @@ private:
/// The system-wide, user-provided configuration.
actor_system_config& cfg_;
/// Manages all metrics collected by the system.
telemetry::metric_registry metrics_;
/// Stores whether the logger has run its destructor and stopped any thread,
/// file handle, etc.
std::atomic<bool> logger_dtor_done_;
......
......@@ -219,6 +219,7 @@ actor_system::networking_module::~networking_module() {
actor_system::actor_system(actor_system_config& cfg)
: profiler_(cfg.profiler),
ids_(0),
metrics_(cfg),
logger_(new caf::logger(*this), false),
registry_(*this),
groups_(*this),
......@@ -226,7 +227,6 @@ actor_system::actor_system(actor_system_config& cfg)
await_actors_before_shutdown_(true),
detached_(0),
cfg_(cfg),
metrics_(cfg),
logger_dtor_done_(false),
tracing_context_(cfg.tracing_context) {
CAF_SET_LOGGER_SYS(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment