Chapter 8. Reactive Extensions

In this chapter, we will look at another interesting .NET library that helps us create asynchronous programs, Reactive Extensions (Rx). We will cover the following recipes:

  • Converting a collection to asynchronous Observable
  • Writing a custom Observable
  • Using the Subject type
  • Creating an Observable object
  • Using LINQ queries against an Observable collection
  • Creating asynchronous operations with Rx

Introduction

As you have already learned, there are several approaches to creating asynchronous programs in .NET and C#. One of them is event-based asynchronous pattern, which has already been mentioned in the previous chapters. The initial goal of introducing events was to simplify the implementation of the Observer design pattern. ...

Get Multithreading with C# Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.