diff --git a/include/boost/thread/concurrent_queues/sync_bounded_queue.hpp b/include/boost/thread/concurrent_queues/sync_bounded_queue.hpp index e34fa56f..5dc4090c 100644 --- a/include/boost/thread/concurrent_queues/sync_bounded_queue.hpp +++ b/include/boost/thread/concurrent_queues/sync_bounded_queue.hpp @@ -484,7 +484,9 @@ namespace concurrent queue_op_status sync_bounded_queue::wait_pull_front(ValueType& elem, unique_lock& lk) { if (empty(lk) && closed(lk)) {return queue_op_status::closed;} - wait_until_not_empty(lk); + bool is_closed = false; + wait_until_not_empty(lk, is_closed); + if (is_closed) {return queue_op_status::closed;} pull_front(elem, lk); return queue_op_status::success; }