Appendix A. Writing asynchronous code in .NET

For modern applications to be responsive, writing asynchronous code is crucial, and it’s a key trait for being reactive. This appendix summarizes what asynchronous code is, what it’s good for, how you can write asynchronous code in .NET, and the best practices for doing so.

A.1. Writing asynchronous code

Imagine you want to ask your friend to send you important information from a document (such as the content of the ReactiveX.io portal). You have two options: you can use the phone to ask your friend to read the information to you, or you can send an email with your request so you both can work on getting the information later. Figure A.1 shows the two options.

Figure A.1. Two approaches to get ...

Get Rx.NET in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.