Chapter 13

Improving Performance and Scalability Using Multitasking

This chapter is about allowing multiple actions to occur at the same time to improve performance, scalability, and user productivity for the applications that you build.

In this chapter, we will cover the following topics:

  • Understanding processes, threads, and tasks
  • Monitoring performance and resource usage
  • Running tasks asynchronously
  • Synchronizing access to shared resources
  • Understanding async and await

Understanding processes, threads, and tasks

A process, with one example being each of the console applications we have created, has resources, like memory and threads allocated to it. A thread executes your code, statement by statement. By default, each process only has one ...

Get C# 8.0 and .NET Core 3.0 - Modern Cross-Platform Development - Fourth Edition now with the O’Reilly learning platform.

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