Re: [Boost-bugs] [Boost C++ Libraries] #11256: future<>::is_ready() == false in continuation function

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11256: future<>::is_ready() == false in continuation function
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-03 18:59:28


#11256: future<>::is_ready() == false in continuation function
-------------------------------------+-------------------------------------
  Reporter: Konrad Zemek | Owner: viboes
  <konrad.zemek@…> | Status: assigned
      Type: Bugs | Component: thread
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.58.0 | Keywords: then continuation
Resolution: | is_ready
-------------------------------------+-------------------------------------

Comment (by viboes):

 Found. A missing unlock here


 {{{
   template<typename F, typename Rp>
   struct future_unwrap_shared_state: shared_state<Rp>
   {
     F wrapped;
     typename F::value_type unwrapped;
   public:
     explicit future_unwrap_shared_state(BOOST_THREAD_RV_REF(F) f)
     : wrapped(boost::move(f)) {
     }

     void launch_continuation(boost::unique_lock<boost::mutex>& lk,
 shared_ptr<shared_state_base> that)
     {
       if (! unwrapped.valid() )
       {
         unwrapped = wrapped.get();
         if (unwrapped.valid())
         {
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11256#comment:12>
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:18 UTC