15 #include <condition_variable>
36 pop_cv_.wait(lock, [
this] {
return !this->
q_.full(); });
37 q_.push_back(std::move(item));
47 q_.push_back(std::move(item));
54 bool dequeue_for(
T &popped_item, std::chrono::milliseconds wait_duration)
58 if (!
push_cv_.wait_for(lock, wait_duration, [
this] { return !this->q_.empty(); }))
62 popped_item = std::move(
q_.front());
77 pop_cv_.wait(lock, [
this] {
return !this->
q_.full(); });
78 q_.push_back(std::move(item));
86 q_.push_back(std::move(item));
92 bool dequeue_for(
T &popped_item, std::chrono::milliseconds wait_duration)
95 if (!
push_cv_.wait_for(lock, wait_duration, [
this] { return !this->q_.empty(); }))
99 popped_item = std::move(
q_.front());
110 return q_.overrun_counter();