Boost C++ Libraries: Ticket #7798: boost::future set_wait_callback thread safety issues https://svn.boost.org/trac10/ticket/7798 <p> See, <a class="ext-link" href="http://stackoverflow.com/questions/9355110/boostfuture-is-wait-callback-guaranteed-to-only-be-invoked-once/13891873#13891873"><span class="icon">​</span>http://stackoverflow.com/questions/9355110/boostfuture-is-wait-callback-guaranteed-to-only-be-invoked-once/13891873#13891873</a>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7798 Trac 1.4.3 viboes Sat, 15 Dec 2012 14:27:26 GMT <link>https://svn.boost.org/trac10/ticket/7798#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7798#comment:1</guid> <description> <p> 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. </p> <pre class="wiki">"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." </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 15 Dec 2012 14:28:03 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/7798#comment:2 https://svn.boost.org/trac10/ticket/7798#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Mon, 17 Dec 2012 17:31:00 GMT milestone changed https://svn.boost.org/trac10/ticket/7798#comment:3 https://svn.boost.org/trac10/ticket/7798#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> <p> I have just added a lock to protect the callback setting. Committed in trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/81975" title="Thread: make set_wait_callback thread-safe.">[81975]</a>. </p> Ticket viboes Fri, 21 Dec 2012 22:20:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7798#comment:4 https://svn.boost.org/trac10/ticket/7798#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket