fix race condition in logging.hpp

This commit is contained in:
Mars 2025-05-02 13:07:02 -04:00
parent f03ca4f293
commit c33ab763e6
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5
2 changed files with 13 additions and 6 deletions

View file

@ -5,6 +5,7 @@
#include <future> // std::future (Future)
#include <map> // std::map (Map)
#include <memory> // std::shared_ptr and std::unique_ptr (SharedPointer, UniquePointer)
#include <mutex> // std::mutex and std::lock_guard (Mutex, LockGuard)
#include <optional> // std::optional (Option)
#include <string> // std::string (String, StringView)
#include <string_view> // std::string_view (StringView)
@ -34,6 +35,9 @@ namespace util::types {
using Exception = std::exception; ///< Standard exception type.
using Mutex = std::mutex; ///< Mutex type for synchronization.
using LockGuard = std::lock_guard<Mutex>; ///< RAII-style lock guard for mutexes.
inline constexpr std::nullopt_t None = std::nullopt; ///< Represents an empty optional value.
/**