
20 Oct
2012
20 Oct
'12
3:47 p.m.
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