W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Re: DOM: Futures

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 29 Mar 2013 08:23:42 +0000
Message-ID: <CADnb78h4iNz42XgFoVbwfohgK8aAeT+noq_nQ=A0wSbE0QL8rA@mail.gmail.com>
To: Jake Verbaten <raynos2@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, "www-dom@w3.org" <www-dom@w3.org>
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.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC