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 the ...

Get Rx.NET in Action 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.