Boost logo

Boost :

Subject: Re: [boost] Executor associated to the future continuations (was [thread] boost::future::then)
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-10-30 15:24:41


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?

-- 
Vladimir Prus
http://vladimirprus.com

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