From 51b367df53bc2f9a3f720cc062d997fb4eb89571 Mon Sep 17 00:00:00 2001 From: "Vicente J. Botet Escriba" Date: Sat, 29 Apr 2017 16:12:35 +0200 Subject: [PATCH] manage with 12958. --- include/boost/thread/concurrent_queues/sync_bounded_queue.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }