2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-30 20:32:10 +00:00

manage with 12958.

This commit is contained in:
Vicente J. Botet Escriba
2017-04-29 16:12:35 +02:00
parent da83662e1a
commit 51b367df53

View File

@@ -484,7 +484,9 @@ namespace concurrent
queue_op_status sync_bounded_queue<ValueType>::wait_pull_front(ValueType& elem, unique_lock<mutex>& 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;
}