Opened 10 years ago

Closed 10 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:

Description

Change History (4)

comment:1 by viboes, 10 years ago

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 10 years ago by viboes (previous) (diff)

comment:2 by viboes, 10 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:3 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.53.0

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

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

comment:4 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.