English
Topic 5. Asynchronous programming with async/await in graphical user interface applications
Goal: become familiar with the UI thread, Task objects, and the Windows Forms synchronization context; learn to perform I/O operations and computations asynchronously with async/await and Task.Run, report progress through IProgress<T>, and cancel operations with a token; master running several tasks concurrently, limiting parallelism, handling exceptions, and the asynchronous Windows Forms methods in .NET 10.
Lecture contents
- Tasks, async, and await — Why the interface "freezes" · Task and Task<T> · The async and await keywords
- Context, computation, and cancellation — The synchronization context · I/O operations and computations · Operation progress and cancellation
- Asynchronous streams and multiple tasks — Asynchronous data streams · Several tasks at once
- Exceptions and asynchronous form methods — Exceptions in asynchronous code · Asynchronous Windows Forms methods in .NET 9–10
- Debugging and common mistakes — Debugging and common mistakes