3. Task-Based Asynchronous Programming

Many of our programming tasks involve starting and responding to asynchronous work. We work on distributed programs, running on multiple machines or virtual machines. Many applications span threads, processes, containers, virtual machines, or physical machines. Asynchronous programming, however, is not synonymous with multithreaded programming. Modern programming means mastering asynchronous work. That work may include awaiting the next network packet, or awaiting user input.

The C# language, along with some classes in the .NET Framework, provides tools that make asynchronous programming easier. Asynchronous programming can be challenging, but when you remember a few important practices, it becomes easier ...

Get More Effective C# (Includes Content Update Program): 50 Specific Ways to Improve Your C#, 2nd 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.