Introduction to C# Threading

Are you a C# developer and want to take your multi-threading skills to the next level? Are you working on a critical section of code and need to make sure your multi-threaded code is rock-solid in production? Or are you preparing for a C# exam?

Then this is the course for you! The tips and tricks in this course will give you an excellent foundation to start writing your very own bulletproof multi-threaded code. 

The course covers threads, starting and aborting threads, locking threads, deadlocks, synchronizing threads, the AutoResetEvent and friends, and the thread barrier class. All you need to know to write your own robust multi-threaded code that will just keep running and never fail on you in production.

Here’s What You’ll Get

Training Lectures

Video Lessons


C# Code Examples



Training Details

This course contains a series of short lectures that cover many fundamental multithreading topics. I’ll show you all the problems you can expect in asynchronous code, like race conditions, deadlocks, livelocks and synchronisation issues. I’ll teach you quick and easy strategies to resolve these problems.

You will learn to write multithreaded code, how to safely start and abort a thread, and how to exchange data between two or more threads. I’ll explain the main reasons why multithreaded code often crashes, and what you can do about it. We’ll also look at resolving race conditions, using the AutoResetEvent and ManualResetEvent in code… and much more!

By the end of this course you will be able to write robust multithreaded C# code that can take a beating.


Name: Introduction to C# Threading.

Format: Self-paced.

Content: training lectures, video lessons, and quizzes

Requirements: a Windows, Mac or Linux laptop with Visual Studio Code and the NET Framework

Support: Slack channel.

Associated certification: none.


Sneak Preview

In this complimentary training lecture, I will teach you how to synchronize two threads by using the special AutoResetEvent class in C#. This class allows two threads to safely exchange data without risking a race condition or a deadlock.

Training Curriculum


Course Intro

Introduction to Threading

Windows, OS/X or Linux? 

Working with Threads


How to Start a Thread

First Problem: Race Conditions

Passing In Data to a Thread

Second Problem: Waiting On a Thread

Joining and Suspending Threads

Interrupting and Aborting Threads



Introducing Thread Locking


When Should You Lock Threads?

The Lock Statement

Dealing With Deadlocks

Assignment: Have Dinner With The Philosophers

Using The Interlocked Class



How to Synchronize Thread


Thread Synchronization With AutoResetEvents 

How to Build a Producer/Consumer Queue

The ManualResetEvent Class 

The CountdownEvent Class

Thread Rendezvous



In Conclusion

What you´ve learned

Sign Up For This Training

You can sign up for this training right now by clicking the button, filling in the checkout form and completing your payment.

Once we have received your payment, you will receive an email within minutes with a link to access the online training platform.

Please note that the listed price is ex VAT. Registered EU businesses with a valid VAT number can defer the VAT during checkout. Non-EU businesses and individuals do not pay VAT.

Looking For Something Else?

Is this online training not what you’re looking for? Then please check out my other C# training courses.

Related Microsoft Training


Would you rather train with your team in a classroom setting? Then please check out my Microsoft C# training courses.

“I wish I had started sooner, because this is a really good course. Mark takes the time to explain difficult concepts in a way that is easy to digest. For example, I loved his explanation of the AutoResetEvent class. I never really understood it that well until now.”

Vikram Hegde, online student

See Me In Action


In 2005 the Dutch innovation center MediaPlaza invited me to help them build the supermarket shelf of the future. We created a cabinet with hidden RFID antenna’s that automatically detected when products tagged with RFID chips were placed on or picked up from the shelves. We also added LCD displays showing dynamic prices and TV monitors for playing narrowcasting commercials and showing live stock levels.

I wrote the multi-threaded C# code that drove the RFID antenna’s, detected products entering or leaving the antenna fields, updated the prices on the LCD displays, played commercials and updated the stock levels automatically. The photo shows the finished product running my software at a trade show in Utrecht.

Frequently Asked Questions

  • Classroom Training
  • Microsoft Training
  • Online Training
  • Misc
What is a classroom training?
A classroom training is a live event in which I will present the training lectures and help you complete the lab exercises. You will be sharing the classroom with your colleagues and learn together as a group.
Where is a classroom training conducted?
Depending on your needs, classroom trainings can be conducted on-site at your place of work, in a fully-equipped classroom at a training agency, or online in a multi-day Microsoft Teams or Zoom session.
Who should attend a classroom training?
A classroom training is ideal for tech professionals who can commit to full days of learning and want to learn together as a group.
How am I supported in a classroom training?
I will continuously support you live, because we’ll both be in the same physical or virtual classroom together.
What is a Microsoft training?
A Microsoft training is an official classroom training course from the Microsoft training catalog that will teach you essential tech skills and prepare you for a certification exam.
What's included in a Microsoft training?
You will receive online course content, access to an Azure sandbox environment, lab exercises, a practice exam and an exam voucher.
How long do I have access to a Microsoft training?
You have unlimited access to the training content, 180 days access to the lab environment and 30 days of access to the practice exam. The exam voucher is valid for a year.
How can my team and I attend a Microsoft training?
Please provide your requirements in the form on the training pages and I will contact you as soon as possible to plan and set up your training.
What is an online training?
In an online training you can study the training lectures and work on the lab assignments in your own time and at your own pace. You can spend as many or as little hours per week as you want on the training. This training format is ideal for tech professionals who have irregular work hours and cannot commit to a classroom training.
What's included in an online training?
You will receive prerecorded online video lectures, text lectures, multiple-choice quizzes and homework exercises.
How am I supported in an online training?
You are supported through email, and you can also book a 30-minute video support call with me if you want. I will help you with the training lectures and lab exercises and get you ready for your certification exams.
Who should attend an online training?
An online training is ideal for tech professionals who want to set their own learning pace and prefer to work independently with a bit of guidance and support throughout the training.
Are you a certified trainer?
Yes. I started classroom training in 1997 and obtained my Microsoft Certified Trainer (MCT) credential in 2005. I currently have more than 25 years of training experience.
What is the maximum size for a classroom training?
It depends on the size of the classroom, the team and the complexity of the subject. But typically, groups of up to 15 students work best. If you have a larger group, it's best to split them over multiple training sessions.
Can you provide training in a non-English language?
Yes, I am fluent in English, Dutch and German thanks to a multilingual upbringing by my international family. I can provide any training in all three languages.
Will you travel to my country to provide a classroom training?
Yes. I am based in Amsterdam and often travel abroad to provide classroom training in other countries. I love meeting my students on-site, no matter where they live.