Modify

Ticket #7798 (closed Bugs: fixed)

Opened 16 months ago

Last modified 16 months ago

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

Change History

comment:1 Changed 16 months 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 16 months ago by viboes (previous) (diff)

comment:2 Changed 16 months ago by viboes

  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned

comment:3 Changed 16 months 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 16 months ago by viboes (previous) (diff)

comment:4 Changed 16 months ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
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.