Module #1: Thursday, 8 May, 17.00-20.00
This module sets the foundation by introducing the course and covering core concepts like Threads, the Thread Pool, and Tasks, giving you the tools to understand the basics of asynchronous programming.
Briefly about the teaching
In today’s dynamic software landscape, mastering asynchronous programming is increasingly essential for writing faster, hardware-optimized applications. As multi-core CPUs are now
standard, parallel processing is the key to unlocking performance.
This comprehensive course for seasoned C# and .NET developers will cover a wide range of topics, from threads, tasks, and async/await to advanced features like task schedulers and
asynchronous streams.
Included are plenty of hands-on exercises that enable you to master and apply the concepts of asynchronous programming. By the end of this course, you will understand how to use
asynchronous techniques to optimize your applications’ efficiency, scalability, and responsiveness.
What to expect from this course
This course is structured as a four-part series, with each evening session covering around 2-3 chapters. Each chapter will start with a presentation and live demonstration of key concepts
by the instructor. After that, you’ll have a fixed amount of time to work on exercises designed to reinforce what you've learned. There are plenty of exercises—including some bonus
ones—so if you don’t complete them all during class, you’ll have the opportunity to finish them on your own after the session.
Requirements
To fully participate in the exercises, please ensure you have Visual Studio 2022 and .NET 8
installed on your computer. Some exercises may also require access to the public internet.
Important
This course builds on each session, so it's essential to start from the beginning. The instructor cannot provide support for missed sessions.
Audience
Experienced C# developers who want to understand how to correctly write asynchronous programming to enhance their applications using asynchronous and parallel
programming.
Prerequisites
To get the most out of this training, participants should have at least one year of experience as a C# developer. A strong understanding of C#, including generics, lambdas,
and LINQ, is crucial. Previous experience in parallel or async programming is not required. This course is up-to-date with .NET 8 and C#12.
After the course, the participant will understand how to utilize asynchronous programming in C# to write responsive, efficient, and scalable applications, mastering techniques such as async/await, task management, and error handling in asynchronous code.
Instructor
Tore Nestenius is an independent software consultant and trainer based in Helsingborg, Sweden. For the last 10 years, he has been training developers all around the world in software architecture, web security, OpenID-connect, C#/.NET and domain-driven design.
Direct link will be sent on the day of the course.
The course will not be recorded.
Language and materials are in English.
Module #2: Thursday, 15 May, 17.00-20.00
We expand on tasks by exploring how to wait for them, handle errors effectively, and implement cancellation to build more robust asynchronous applications.
Module #3: Thursday, 22 May, 17.00-20.00
This module focuses on continuations and introduces async/await, showing how these features simplify writing clean and efficient asynchronous code.
Module #4: Monday26 May, 17.00-20.00
We conclude with advanced topics, including Task Schedulers, Synchronization Contexts, and ConfigureAwait, equipping you with techniques for fine-grained control over asynchronous execution.
Content: Across four courses, we will cover the following topics:
- Introduction, Processes and Threads
- Synchronous vs. Asynchronous programming
- Processes
- Threads
- Thread pool
- The cost of creating threads
- Worker and I/O Threads
- When not to use the thread pool
- Tasks
- Creating tasks
- Returning data from a task
- Using Tasks or Threads?
- Waiting for tasks
- Error Handling in Asynchronous Programming
- Exceptions in threads
- Exceptions in tasks
- Cancelling tasks
- Cancellation Token Source
- Tokens
- Continuations
- Async – await
- Async methods
- Async state machine
- The await keyword
- Returning data from async methods
- Async all the way
- Async lambdas
- Optimizing async/await
- .GetAwaiter().GetResult()
- WaitAsync
- Task Schedulers
And much more