Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New concept: a promise for an iterable. Iterables include arrays, objects with an "iterator" method that returns an iterator, iterators (including generators and the new Queue). The `next` method of a promise iterable may return a promise for the next value, or the value may be a promise. A new implementation of Queue provides an iterator interface. `map`, `reduce`, `forEach`, and `buffer` are introduced for performing various operations in parallel and serial, with input coming from any iterable. All of these support back-pressure, leaving values on the input iteration until the number of concurrent promises have dropped below some specified threshold. All of these support notifications for their internal buffer levels. `all` has been reworked to accept a promise for any iterable. This introduces a degree of conceptual unity around ES6 iterators. As such this drops support for SpiderMonkey's original iterators, and all the corresponding shims. This patch must only land in a backward-incompatible release, probably v0.10.0.
- Loading branch information