Death::Trace::ThreadContext class

Stores information about the current thread and allows to receive logged entries.

This class should not usually be used directly.

Constructors, destructors, conversion operators

ThreadContext(Implementation::QueueType queueType, std::uint32_t initialSpscQueueCapacity, bool hugesPagesEnabled)
~ThreadContext() noexcept
ThreadContext(ThreadContext const&) deleted

Public functions

auto operator=(ThreadContext const&) -> ThreadContext& deleted
auto GetSpscQueue() -> Implementation::SPSCQueue& noexcept
Returns single-producer single-consumer queue for logged entries.
auto HasBoundedQueueType() const -> bool noexcept
Returns true if a bounded queue is used.
auto HasUnboundedQueueType() const -> bool noexcept
Returns true if an unbounded queue is used.
auto HasDroppingQueue() const -> bool noexcept
Returns true if a dropping queue is used.
auto HasBlockingQueue() const -> bool noexcept
Returns true if a blocking queue is used.
auto GetThreadId() const -> Containers::StringView noexcept
Returns the thread ID of the current thread context.
void MarkInvalid() noexcept
Marks the thread context as invalid.
auto IsValid() const -> bool noexcept
Returns true if the thread context is still valid.
void IncrementFailureCounter() noexcept
Increments number of failures.
auto GetAndResetFailureCounter() -> std::size_t noexcept
Returns the current number of failures and resets the counter.