Modify

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 anthonyw to viboes
  • Status changed from new to assigned

comment:3 Changed 5 years ago by viboes

  • Milestone changed from To Be Determined to Boost 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 set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.