Re: DOM: Futures

On Thu, Mar 28, 2013 at 10:06 PM, Jake Verbaten <raynos2@gmail.com> wrote:
> What are the semantics for the IO a Future does?
>
> Does it start doing an asynchronous operation immediately?
> Does it start doing an asynchronous operation once then or accept or done is
> called?

This is up to the implementation. In theory the operation could
already be running or have been completed once you construct a future.
Often I would expect it to start once you construct one, but the nice
thing is that the feature allows implementations to optimize that in a
non-observable way.


> Is a future a lazy representation of the asynchronous result?
> Or is it simply an object on which you can put glorified event listeners for
> success & failure?

Reading https://github.com/slightlyoff/DOMFuture/blob/master/README.md
might help.


-- 
http://annevankesteren.nl/

Received on Friday, 29 March 2013 08:24:09 UTC