[Boost-bugs] [Boost C++ Libraries] #10964: future<future<T>>::unwrap().then() Deadlocks

Subject: [Boost-bugs] [Boost C++ Libraries] #10964: future<future<T>>::unwrap().then() Deadlocks
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-01-23 22:35:36


#10964: future<future<T>>::unwrap().then() Deadlocks
------------------------------+----------------------
 Reporter: code@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 The shared_state returned by unwrap() doesn't appear to propagate
 continuation information properly. The following code will deadlock, but
 the continuations should be immediately invoked.

 {{{
 struct TestCallback
 {
     typedef boost::future<void> result_type;

     result_type operator()(boost::future<void> future) const
     {
         future.get();
         return boost::make_ready_future();
     }

     result_type operator()(boost::future<boost::future<void>> future)
 const
     {
        future.get();
        return boost::make_ready_future();
     }
 };

 int main()
 {
     boost::make_ready_future().then(
         TestCallback()).unwrap().then(TestCallback()).get();
     return 0;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10964>
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