Opened 6 years ago
Closed 5 years ago
#12958 closed Bugs (fixed)
sync_bounded_queue::wait_pull_front( lve ) might throw
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | Boost 1.65.0 | Component: | thread |
Version: | Boost 1.63.0 | Severity: | Problem |
Keywords: | sync_queue | Cc: | enniobarbaro@… |
Description
Expected behavior:
A call to to
sync_bounded_queue<T>::wait_pull_front
can only throw viaT
'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 async_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.
Change History (3)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.65.0 |
---|
comment:3 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
https://github.com/boostorg/thread/commit/51b367df53bc2f9a3f720cc062d997fb4eb89571