Boost logo

Boost :

Subject: Re: [boost] Do you know of standard implementation of async() that blocks on the future-destructor?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-10-12 17:42:00


Le 12/10/15 15:57, Agustín K-ballo Bergé a écrit :
> On 10/11/2015 9:02 PM, Vicente J. Botet Escriba wrote:
>> Hi,
>>
>> all is in the title.
>
> Don't they all? Blocking in the future destructor is what the standard
> mandates.
>
I'm confused. Do they block on the future destructor or the destructor
of the shared state?

The note of the standard says on the destructor of the returned future

> "[ Note: If a future obtained from std::async is moved outside the
local scope, other code that uses the future must be aware that the
future’s destructor may block for the shared state to become ready. —
end note ]"

C++ International Standard
Vicente


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