Asynchronous Programming in C#

Discover the practical power of Asynchronous Programming in C# and gain the expertise needed to write responsive, efficient, and scalable applications.

Dager: 2

Pris: 16900

Kurskategori: Applikasjonsutvikling

Kursdatoer er ikke helt avklart ennå, men kontakt [email protected] for påmelding!

What Will Developers Learn?
This comprehensive two-day 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 synchronization contexts. 

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.

Target Audience: C# Developers
Experienced C# developers who want to understand how to correctly write asynchronous programming to enhance their applications using asynchronous and parallel programming.

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 course is designed for C# developers seeking to take their apps to the next level. 

What Are the Course's 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 9 and C#13.

Kursdatoer er ikke helt avklart ennå, men kontakt [email protected] for påmelding!

Agenda

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

Async Error Handling

Synchronization contexts

  • SynchronizationContext vs. TaskScheduler

ConfigureAwait

  • Capturing the context

Value Tasks

  • Tasks vs ValueTasks

Ønsker du å samle flere ansatte til et bedriftsinternt kurs?

Finner du ikke det helt optimale kurset eller kombinasjonen av kurs? Da ordner vi det - sammen. Vi kan tilrettelegge kurs slik at de inneholder akkurat det dere har behov for. Vi kan sette opp et helt nytt kurs, eller tilpasse eksisterende kurs og materiell. Flere medarbeidere kan selvfølgelig også samles til et eget felles kurs, for maksimal effektivitet. Ta kontakt med meg for et forslag til gjennomføring og et tilbud basert på deres behov.

Henrik Buzzi