New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FutureGroup to dart:async #6626
Comments
I'm using web_ui's FutureGroup in buildtool. It's definitely handy, and we now have a suitable library to put it in in dart:async. cc @jmesserly. |
This comment was originally written by munificentbob...@gmail.com +1! We copy/pasted this into Pub to use it there too. Would be nice if it was just in dart:async. |
This comment was originally written by @seaneagan Often you have an Iterable<E> each of whose elements are mapped to a Future<T>, so it would be nice if it were FutureGroup<T>. And now that Future no longer exposes a "value" property, it would make more sense for FutureGroup.future to be a Future<List<T>> instead of a Future<List<Future<T>>>. Also, a FutureGroup.from constructor might be nice. |
cc @sigmundch. |
We now have another copy in polymer :) Florian/Lasse - what are your thoughts on adding this type to dart:async? I'd be happy to create a patch for you, but I wanted to make sure you like the idea first. cc @jmesserly. |
It's also in scheduled_test and test.py. :) |
I like it, but it should not be in dart:async, but in a package. Added NotPlanned label. |
It's already available in quiver.async: http://google.github.io/quiver-dart/docs/quiver.async/FutureGroup.html |
This class has been copied around in various forms for ages; see for example dart-lang/sdk#6626. This is more or less a full rewrite with tests added. R=lrn@google.com Review URL: https://codereview.chromium.org//1179053003.
Web components has a nice FutureGroup class that lets you wait on a dynamically modifiable set of futures. It ends up coming in handy in a few places (like test.dart). Consider adding it to dart:core?
https://github.com/dart-lang/dart-web-components/blob/master/lib/src/utils.dart#L90
The text was updated successfully, but these errors were encountered: