[Boost-bugs] [Boost C++ Libraries] #10966: packaged_task::reset should not reuse the shared state to conform to C++11

Subject: [Boost-bugs] [Boost C++ Libraries] #10966: packaged_task::reset should not reuse the shared state to conform to C++11
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-24 09:51:16


#10966: packaged_task::reset should not reuse the shared state to conform to C++11
------------------------------+----------------------
 Reporter: viboes | Owner: anthonyw
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 The standard says


 {{{
 void reset();
 Effects: as if *this = packaged_task(std::move(f)), where f is the task
 stored in *this. [ Note: This constructs a new shared state for *this. The
 old state is abandoned (30.6.4). — end note ]
 Throws:
 â€” bad_alloc if memory for the new shared state could not be allocated.
 â€” any exception thrown by the move constructor of the task stored in the
 shared state.
 â€” future_error with an error condition of no_state if *this has no shared
 state.
 }}}

 Boost.Thread reuse the shared state.

 {{{
 Effects: Reset the state of the packaged_task so that it can be called
 again.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10966>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC