Boost logo

Boost :

Subject: Re: [boost] [thread] request for interest in new c++1y features
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-10-20 11:47:19


Le 20/10/12 15:45, Bjorn Reese a écrit :
> On 2012-10-20 12:40, Vicente J. Botet Escriba wrote:
>
>> I would like to include some of the new thread/future proposed features
>> included in N3428: A Standard Programmatic Interface for Asynchronous
>> (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3428.pdf).
>
> The future.then proposal looks very useful.
>
> It is unclear to me, however, what happens if the async call returns
> before .then is hooked up. Will the .then function be executed in the
> calling thread?
>
Yes, as I understand it then() checks if the future is already ready as
otherwise it will never be notified of the change and call then to the
continuation function on the calling thread. Do you see any problems
with this approach?

Best,
Vicente


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