Boost logo

Boost :

Subject: Re: [boost] Executor associated to the future continuations (was [thread] boost::future::then)
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-10-30 20:38:37


Le 30/10/15 20:24, Vladimir Prus a écrit :
> On 30-Oct-15 8:28 PM, Vicente J. Botet Escriba wrote:
>> Le 30/10/15 13:42, Vladimir Prus a écrit :
>>> On 30-Oct-15 10:08 AM, Vladimir Prus wrote:
>>>
>>>
>>> BTW, I've noticed that if I call boost::future::get() twice in my
>>> continuation, on the same future object,
>>> the second call throws, saying:
>>>
>>> Operation not permitted on an object without an associated state
>>>
>>> you can find the example at:
>>>
>>> https://gist.github.com/vprus/d53ef0860608b856aa60
>>>
>>> Am I missing something? Looking at both std::future and
>>> boost::future documentation, I see no indication
>>> that calling get clears the state.
>>>
>> No. a future moves itself to the continuation so you can not
>> associate twice a continuation. You need to use shared_future.
>>
>> Please, create a ticket.
>
> Trac or GitHub?
>
Trac :)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk