From 01ef17ef45c31fbd5451d7f0a61efc417c8c9181 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 7 Dec 2024 16:59:37 +0200 Subject: [PATCH] Updated comments --- include/spdlog/details/mpmc_blocking_q.h | 2 +- include/spdlog/sinks/async_sink.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/spdlog/details/mpmc_blocking_q.h b/include/spdlog/details/mpmc_blocking_q.h index 67e3fde8..af7d12fd 100644 --- a/include/spdlog/details/mpmc_blocking_q.h +++ b/include/spdlog/details/mpmc_blocking_q.h @@ -37,7 +37,7 @@ public: push_cv_.notify_one(); } - // enqueue immediately. overrun oldest message in the queue if no room left. + // enqueue immediately. overrun the oldest message in the queue if no room left. void enqueue_nowait(T &&item) { { std::unique_lock lock(queue_mutex_); diff --git a/include/spdlog/sinks/async_sink.h b/include/spdlog/sinks/async_sink.h index 1420555b..683cb6cb 100644 --- a/include/spdlog/sinks/async_sink.h +++ b/include/spdlog/sinks/async_sink.h @@ -26,10 +26,9 @@ public: // Async overflow policy - block by default. enum class overflow_policy : std::uint8_t { - block, // Block until message can be enqueued (default - overrun_oldest, // Discard oldest message in the queue if full when trying to - // add new item. - discard_new // Discard new message if the queue is full when trying to add new item. + block, // Block until the log message can be enqueued (default). + overrun_oldest, // Overrun the oldest message in the queue if full. + discard_new // Discard the log message if the queue is full }; explicit async_sink(size_t queue_size = default_queue_size) {