9 #include "quill/core/Attributes.h" 30 QUILL_ATTRIBUTE_HOT
void lock() noexcept
34 while (_flag.load(std::memory_order_relaxed) == State::Locked)
38 }
while (_flag.exchange(State::Locked, std::memory_order_acquire) == State::Locked);
42 QUILL_ATTRIBUTE_HOT
void unlock() noexcept
44 _flag.store(State::Free, std::memory_order_release);
48 enum class State : uint8_t
54 std::atomic<State> _flag{State::Free};
Setups a signal handler to handle fatal signals.
Definition: BackendManager.h:24
Definition: Spinlock.h:18
Definition: Spinlock.h:58