Updated comments

This commit is contained in:
gabime 2024-12-07 16:59:37 +02:00
parent 43998c07f9
commit 01ef17ef45
2 changed files with 4 additions and 5 deletions

View File

@ -37,7 +37,7 @@ public:
push_cv_.notify_one(); 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) { void enqueue_nowait(T &&item) {
{ {
std::unique_lock<std::mutex> lock(queue_mutex_); std::unique_lock<std::mutex> lock(queue_mutex_);

View File

@ -26,10 +26,9 @@ public:
// Async overflow policy - block by default. // Async overflow policy - block by default.
enum class overflow_policy : std::uint8_t { enum class overflow_policy : std::uint8_t {
block, // Block until message can be enqueued (default block, // Block until the log message can be enqueued (default).
overrun_oldest, // Discard oldest message in the queue if full when trying to overrun_oldest, // Overrun the oldest message in the queue if full.
// add new item. discard_new // Discard the log message if the queue is full
discard_new // Discard new message if the queue is full when trying to add new item.
}; };
explicit async_sink(size_t queue_size = default_queue_size) { explicit async_sink(size_t queue_size = default_queue_size) {