Publication date : 01/09/2024

Course : .Net, multithreaded development

Practical course - 3d - 21h00 - Ref. ILQ
Price : 1650 € E.T.

.Net, multithreaded development




This course covers asynchronous programming with the Task Parallel Library, as well as best practices for its effective implementation in C#. You'll see how to manage memory sharing, synchronization problems, asynchronism with tasks and development best practices.


INTER
IN-HOUSE
CUSTOM

Practical course in person or remote class
Disponible en anglais, à la demande

Ref. ILQ
  3d - 21h00
1650 € E.T.




This course covers asynchronous programming with the Task Parallel Library, as well as best practices for its effective implementation in C#. You'll see how to manage memory sharing, synchronization problems, asynchronism with tasks and development best practices.


Teaching objectives
At the end of the training, the participant will be able to:
Thread synchronization in .Net
Understand the resources offered by Task Parallel Library and Task Parallel Library Dataflow
Choosing the right collection for a multithreaded algorithm
Combine event-driven programming and multithreading with Reactive Extension

Intended audience
Developers, architects, project managers.

Prerequisites
Knowledge of .Net or an object-oriented programming language.

Course schedule

1
Basic multithreading tools

  • What is a thread? Notion of thread and process.
  • Memory sharing by threads.
  • ThreadPool to avoid thread creation.
  • AppDomain for module isolation.
  • Multi-process synchronization: Event, Mutex and Semaphore synchronization objects.
  • Intraprocess synchronization: the framework's Monitor class and the lock keyword.
  • The danger of a fatal embrace and how to detect it.
  • ReaderWriterSlimLock class. Interlocked class.
Hands-on work
Synchronization of two threads, data producer and data consumer. Use of standard classes.

2
Basics of the Task Parallel Library

  • Start tasks and get results.
  • await and async keywords.
  • Continuations to manage normal end, on exception, cancellation.
  • Event Asynchronous Pattern versus Task Asynchronous Pattern.
  • Parallel Linq to run Linq queries in parallel.
  • Handling exceptions and cancellations with Parallel Linq.
  • Parallel.ForEach to launch data-driven tasks.
  • Parallel.For for aggregate calculations.
Hands-on work
Calcul d’une somme en parallèle avec différents outils. Démarrage de Tasks et utilisation de await et async.

3
Find out more about Task Parallel Library

  • Select where to run a task: TaskScheduler.
  • ConfigureAwait to optimize recovery.
  • Report progress with Progress<T>.
  • Task cancellation with CancellationTokenSource.
  • IAsynEnumerable<T> and await foreach from C# 8.
Hands-on work
Job cancellation and progress report in the crawler.

4
Collections for the competition

  • Immutable collections when a snapshot of the data is sufficient.
  • Concurrent collections for protected sharing of modified data.
  • Collections for producer/consumer issues.
Hands-on work
Optimizing and protecting the crawler with competing collections.

5
Task Parallel Library Dataflow

  • Task Parallel Library Dataflow for execution in parallel networks.
  • The different Dataflow blocks, and how they are linked.
  • Conditional block linking.
  • Dataflow and data buffering.
  • Dataflow and parallelized processing.
  • Dynamic block linking.
Hands-on work
Decoupled communication between a web server and a backend.

6
Reactive Extension for reactive programming

  • Reactive Extension to treat events as sequences.
  • Reactive design model.
  • Hot and cold observables, event data subscription.
  • Linq-style data processing.
Hands-on work
Provide a reactive autosuggestion implementation.


Customer reviews
5 / 5
Customer reviews are based on end-of-course evaluations. The score is calculated from all evaluations within the past year. Only reviews with a textual comment are displayed.
JÉRÉMIE B.
06/10/25
5 / 5

A little extra would be to be able to copy/paste the code from the pdfs.
STESSY B.
06/10/25
5 / 5

Numerous examples and demonstrations by the trainer
VALENTIN C.
06/10/25
5 / 5

The content was very good and the trainer was very educational.



Dates and locations
Select your location or opt for the remote class then choose your date.
Remote class

Dernières places
Date garantie en présentiel ou à distance
Session garantie

REMOTE CLASS
2026 : 30 Mar., 22 June, 2 Nov.

PARIS LA DÉFENSE
2026 : 30 Mar., 22 June, 2 Nov.