17 #include <condition_variable> 39 pop_cv_.wait(lock, [
this] {
return !this->
q_.full(); });
61 if (!
push_cv_.wait_for(lock, wait_duration, [
this] { return !this->q_.empty(); }))
65 q_.pop_front(popped_item);
79 pop_cv_.wait(lock, [
this] {
return !this->
q_.full(); });
97 if (!
push_cv_.wait_for(lock, wait_duration, [
this] { return !this->q_.empty(); }))
101 q_.pop_front(popped_item);
111 return q_.overrun_counter();
void enqueue_nowait(T &&item)
mpmc_blocking_queue(size_t max_items)
std::condition_variable pop_cv_
spdlog::details::circular_q< T > q_
bool dequeue_for(T &popped_item, std::chrono::milliseconds wait_duration)
std::condition_variable push_cv_
millisecond milliseconds
Alias for common language habits.