Subject: [Boost-bugs] [Boost C++ Libraries] #12958: sync_bounded_queue::wait_pull_front( lve ) might throw
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-04-09 17:26:48
#12958: sync_bounded_queue::wait_pull_front( lve ) might throw
------------------------------+----------------------
Reporter: enniobarbaro@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.63.0 | Severity: Problem
Keywords: sync_queue |
------------------------------+----------------------
Expected behavior:
A call to to `sync_bounded_queue<T>::wait_pull_front` can only throw
via `T`'s assignment operator. If the queue is closed, this is reported
via the return value.
Actual behavior:
`sync_bounded_queue<T>::wait_pull_front` might spuriously throw a
`sync_queue_is_closed` error.
Line 486 of `sync_bounded_queue.hpp` (current github master) checks if the
queue is empty and closed; however the very next line calls the one-
argument overload of `wait_until_not_empty`, which might throw if the
queue became closed and empty in the meantime. `wait_pull_front` should
use the overload of `wait_until_not_empty` which returns a `closed` flag.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12958> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-04-09 17:29:39 UTC