-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Operator: ToIterable #18
Comments
First one returns |
The toList operator is non-blocking as it returns Observable<List> whereas to Iterable is blocking and returns Iterable. The key difference is non-blocking versus blocking, otherwise yes, they behave similarly. The other difference though is that toList will wait until the observable sequence is onCompleted() and then emit the List whereas toIterable will buffer but start allowing take() to be called immediately as each onNext() value is emitted. |
Merged. |
By the way ... a key difference in Java is that Iterable is not an equal dual with Observable whereas IEnumerable is a dual to IObservable in .Net where both have extension methods with all the functional operators. Since Java doesn't have extension methods we can't do that here. At best we could have another parallel framework for wrapping an Iterable. |
We already from toObservable(Iterable)/from(Iterable) ... add the reverse blocking toIterable() similar to the non-blocking toList() which already exists.
ToEnumerable from C#: http://msdn.microsoft.com/en-us/library/hh212132(v=vs.103).aspx
The text was updated successfully, but these errors were encountered: