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