W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

Re: Future statics

From: Brandon Wallace <brandon.wallace@yahoo.com>
Date: Fri, 5 Apr 2013 09:56:27 -0700 (PDT)
Message-ID: <1365180987.95028.YahooMailNeo@web162205.mail.bf1.yahoo.com>
To: Anne van Kesteren <annevk@annevk.nl>, "www-dom@w3.org" <www-dom@w3.org>
Hi Anne,

The example code in 4.1 references "Future.when()" but I don't see any definition for this method.

For Future.every() and Future.some(), I did not see anything requiring the order of the values array supplied to the callbacks should match the order of the futures supplied.  These methods will be harder to use without this requirement.

A fourth static would be nice that behaves similar to Task.WhenAll() in the .Net Framework (1)

Future.???() - Almost like 'every' except that it waits for all futures to complete and if any were rejected then rejects the future with an array of the rejection values.

(1) http://msdn.microsoft.com/en-us/library/hh194874.aspx


 From: Anne van Kesteren <annevk@annevk.nl>
To: "www-dom@w3.org" <www-dom@w3.org> 
Sent: Friday, April 5, 2013 11:18 AM
Subject: Future statics
I added a short introduction:
http://dom.spec.whatwg.org/#introduction-to-the-future Hopefully this
gives people an idea of what futures can be used for and why they are

I also these three static methods:

* Future.any() - returns a Future which completes (either accepted or
rejected) when any future passed completes.
* Future.every() - returns a Future which completes when all futures
passed complete or any of them reject.
* Future.some() - returns a Future which completes when any future
passed is accepted or all of them reject.

Received on Friday, 5 April 2013 16:56:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:02 UTC