Modify

Opened 6 months ago

Closed 3 months ago

#12958 closed Bugs (fixed)

sync_bounded_queue::wait_pull_front( lve ) might throw

Reported by: enniobarbaro@… 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 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.

Attachments (0)

Change History (3)

comment:1 Changed 5 months ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 Changed 3 months ago by viboes

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.