Open blois opened 10 years ago
Removed Type-Defect label. Added Type-Enhancement, Library-Async labels.
We already have the StreamController.addStream, so it should be possible to do something similar with a future - it'll be impossible to add anything else while the future is waiting.
For the constructor, it sounds more like a Stream constuctor, liek Stream.fromFutures. There are two alternatives (values in the order of the list, or in the order they comlpete).
Would be nice if StreamController had an addFuture method which added the result of the future once the future completed, or an error if the future errors out. Folks don't always remember to handle the error case.
In addition, it would be great if StreamController had a constructor from a list of Futures which essentially did the same thing.