Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9711: future continuation called twice
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-26 09:27:19
#9711: future continuation called twice
---------------------------+----------------------
Reporter: anonymous | Owner: viboes
Type: Bugs | Status: assigned
Milestone: Boost 1.56.0 | Component: thread
Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords: futures
---------------------------+----------------------
Comment (by anonymous):
If you want to start the continuation in the get() of futr2 that would
mean that this will not start the continuation at all:
{{{
auto futr1 = promise1.get_future();
auto futr2 = futr1.then({});
promise1.set_value();
}}}
Is this intended?
(Please note that the only get() call here is inside the continuation
itself.)
What about this:
{{{
auto futr1 = promise1.get_future();
auto futrLast = futr1.then({}).then({}).then({});
promise1.set_value();
}}}
Do I always have to keep track which future is at the end of the line and
call its get()?
My main use-case would be to not block at all, but this way I am forced to
call get() and thus block in it.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9711#comment:7> 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:15 UTC