소스 검색

backend: Ensure backend_thread is destructed before message_queue

Ensures that stop_token signals that stop has been requested before destruction of conditional_variable
Merry 4 년 전
부모
커밋
22f50c6bc1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/common/logging/backend.cpp

+ 1 - 1
src/common/logging/backend.cpp

@@ -276,9 +276,9 @@ private:
     ColorConsoleBackend color_console_backend{};
     FileBackend file_backend;
 
-    std::jthread backend_thread;
     MPSCQueue<Entry, true> message_queue{};
     std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()};
+    std::jthread backend_thread;
 };
 } // namespace