Reactive Extensions API in depth: even more Zip

Download this episode

Download Video


In the previous episode this episode of the Rx API in depth, Jeff talked about the Zip operator in Rx.

In this episode, Jeff dives even deeper in the semantics of Zip, and shows what happens in OnCompleted, OnError and infinite stream cases.

Visit the Reactive Extensions DevLabs page to download and learn more about Rx.



Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image

      Rx is very interest. But these 2 videos on Zip were very uninforming. Sad


      Please, show us some code, go deep, show us how to use it in code!

    • User profile image

      Cool short videos on Rx framework.


      What I find odd about Zip operator is that the combination of error and infinite stream does not result in error. This seems not coherent with Merge operator.

    • User profile image

      Clearly that was a mistake in the presentation.  The only time Zip would never produce a value is if either stream stops producing values and never trigger done or error (it could also be that both enter this state).  Furthermore, there is a race condition between done and error during zipping which makes the outcome unpredictable.  It all depends on which event is observed first (done or error).


      Please post a follow up video to this to correct this one.  Thanks!

    • User profile image

      I think Bjorg is correct, wouldn't Zip throw an error in the case of ┴ and an exception?

    • User profile image

      Observable.Throw<int>(new InvalidDocumentationException("Video error"))
                      .Zip(Observable.Never<int>(), (lhs, rhs) => new {Left = lhs, Right = rhs})
                      .Subscribe(Console.WriteLine, ex => Console.WriteLine(ex), () => Console.WriteLine("Completed."));

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.