Opened 5 years ago

Closed 5 years ago

#7798 closed Bugs (fixed)

boost::future set_wait_callback thread safety issues

Reported by: ronag89@… Owned by: viboes
Milestone: Boost 1.53.0 Component: thread
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by viboes

The issue is more complex than it seems at a first glance. From the documentation it seems that the callback should be called each time a wait function is called.

"Effects: Store a copy of f with the asynchronous result associated with *this as a
wait callback. This will replace any existing wait callback store alongside that
result. If a thread subsequently calls one of the wait functions on a future or
boost::shared_future associated with this result, and the result is not ready, f(*this)
shall be invoked."
Last edited 5 years ago by viboes (previous) (diff)

comment:2 Changed 5 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 Changed 5 years ago by viboes

Milestone: To Be DeterminedBoost 1.53.0

I have just added a lock to protect the callback setting. Committed in trunk [81975].

Last edited 5 years ago by viboes (previous) (diff)

comment:4 Changed 5 years ago by viboes

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
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.