Observable<T>.race constructor
- Iterable<
Stream< streamsT> >
Given two or more source streams
, emit all of the items from only
the first of these streams
to emit an item or notification.
Example
new Observable.race([
new Observable.timer(1, new Duration(days: 1)),
new Observable.timer(2, new Duration(days: 2)),
new Observable.timer(3, new Duration(seconds: 1))
]).listen(print); // prints 3
Implementation
factory Observable.race(Iterable<Stream<T>> streams) =>
Observable<T>(RaceStream<T>(streams));