Rx API in depth: Concat, Catch and OnErrorResumeNext
- Posted: Dec 11, 2009 at 8:12 AM
- 33,977 Views
- 2 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Might be useful to combine all three into one method: IO<T>.ContinueWith(IO<T> onDone, IO<T> onError). Frankly, I was surprised by the behavior of Concat(). I expected it subscribe immediately and then serialize the observations.
It might be helpful to come up with a naming scheme where the method name hints at if the supplied observable will be subscribed to immediately (like Zip... or should that be Combine?) and those which subscribe later. For example the suffix "Then" may work: ConcatThen(), CatchThen(), OnErrorResumeNextThen(), RepeatThen(), etc.
ContinueWith is a good idea. In fact, it already exists in Rx and is an overload of SelectMany. The only difference is that the SelectMany can continueWith on OnNext, onCompleted, or OnError. This is the correct overload:
IObservable<T>.SelectMany(Func<Notification<T>, IObservable<U>)
Also note that Concat has the same semantics in Rx that is does in Linq to Objects. Namely that the subscription to the second source doesn't happen until the first source has completed.
Remove this comment
Remove this thread
close