Task-based execution
An application UI, regardless of the platform it is implemented on, always follows a single-threaded model. Even if the underlying platform or the hardware supports multithreading, the runtime is responsible for providing a single dispatcher to render the UI in order to avoid multiple threads trying to update the same section of the screen at the same time.
In this single-threaded model, it is the application's responsibility to lay off the background processing to child threads and synchronize back to the UI thread.
The .NET Framework introduced the task-based threading model, also referred to as the Task Asynchronous Programming (TAP) model, in .NET 4.0, and since then it has become a norm for asynchronous execution ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access