reactphp / async

Async utilities and fibers for ReactPHP.
https://reactphp.org/async/
MIT License
204 stars 19 forks source link

Allow `iterable` instead of `array` for `parallel()`, `series()` and `waterfall()` #41

Closed clue closed 2 years ago

clue commented 2 years ago

We should support accepting an iterable instead of only an array for parallel(), series() and waterfall(). The iterable pseudo type is available as of PHP 7.1, so we can take advantage of this for our Async v3 and Async v4 (see also #11 and #14). It supports passing an array just like now, but also accepts Iterators and Generators.

I'm not currently working on this, but figured it makes sense to report here in order to track this feature request. In case anybody feels like picking this up, any input and PRs would be much appreciated :+1: (I've also filed the same suggestion for Promise v3 in https://github.com/reactphp/promise/issues/221)

clue commented 2 years ago

Closed via #45 (v3) and #49 (v4).