From 22f50c6bc1e5b62e3e334f04b49c0b00cb2fea9c Mon Sep 17 00:00:00 2001 From: Merry Date: Thu, 10 Mar 2022 10:49:15 +0000 Subject: backend: Ensure backend_thread is destructed before message_queue Ensures that stop_token signals that stop has been requested before destruction of conditional_variable --- src/common/logging/backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/logging') diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index f1c9ed6c4..4a2462ec4 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -276,9 +276,9 @@ private: ColorConsoleBackend color_console_backend{}; FileBackend file_backend; - std::jthread backend_thread; MPSCQueue message_queue{}; std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()}; + std::jthread backend_thread; }; } // namespace -- cgit v1.2.3