Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Dec 7, 2024
1 parent 43998c0 commit 01ef17e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/spdlog/details/mpmc_blocking_q.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class mpmc_blocking_queue {
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<std::mutex> lock(queue_mutex_);
Expand Down
7 changes: 3 additions & 4 deletions include/spdlog/sinks/async_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ class async_sink final : public dist_sink<Mutex> {

// 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) {
Expand Down

0 comments on commit 01ef17e

Please sign in to comment.