How To Write Multi-threaded C# Code With Locks And Synchronization | Mark Farragher | Skillshare

How To Write Multi-threaded C# Code With Locks And Synchronization

Mark Farragher, Microsoft Certified Trainer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
19 Videos (2h 34m)
    • Course Introduction

      1:50
    • About this course

      4:07
    • Introduction to threading

      4:25
    • How to start a thread

      8:54
    • Race conditions

      3:50
    • Passing data into a thread

      7:22
    • Waiting on a thread

      5:43
    • Joining and suspending threads

      5:05
    • Interrupting and aborting threads

      7:43
    • When should you lock threads?

      8:27
    • The lock statement

      10:59
    • Dealing with deadlocks

      7:28
    • Using the Interlocked class

      10:46
    • Thread synchronisation with AutoResetEvents

      15:18
    • How to build a Producer/Consumer queue

      10:42
    • The ManualResetEvent class

      11:59
    • The CountdownEvent class

      12:57
    • Thread rendezvous

      14:38
    • Course recap

      1:54

About This Class

cec5c78e

Do you know how to write robust multi-threaded C# code that does not crash?

Lets face it: writing multi-threaded code is hard. The sobering truth is that, unless you know exactly what you're doing, your code is pretty much guaranteed to crash in production.

Don't let this happen to you!

It doesn't have to be like this. If you have a good understanding of multi-threaded programming and follow a few simple industry best practices, you can write robust code that can take a beating.

I wrote a multi-threaded conversion utility a few years ago, that successfully migrated 100,000 documents from SharePoint 2010 to SharePoint 2013. The program worked flawlessly the first time, because I implemented all of the best practices for writing asynchronous C# code.

Sound good?

In this course I am going to share these practices with you.

In a series of short lectures I will cover many multi-threading topics. I will show you all of the problems you can expect in asynchronous code, like race conditions, deadlocks, livelocks and synchronisation issues. I'll show you quick and easy strategies to resolve these problems.

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

Why should you take this course?

You should take this course if you are a beginner or intermediate C# developer and want to take your skills to the next level. Asynchronous programming might sound complicated, but all of my lectures are very easy to follow, and I explain all topics with clear code and many instructive diagrams. You'll have no trouble following along.

Or maybe you're working on a critical section of code in a multi-threaded C# project, and need to make sure your code is rock-solid in production? The tips and tricks in this course will help you immensely.

Or maybe you're preparing for a C# related job interview? This course will give you an excellent foundation to answer any threading-related questions they might throw at you.

11

Students

--

Projects

  • --
  • Beginner
  • Intermediate
  • Advanced
  • All Levels
  • Beg/Int
  • Int/Adv

Level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

Mark Farragher

Microsoft Certified Trainer

Mark Farragher is a blogger, investor, serial entrepreneur, and the author of 11 successful Udemy courses. He has been a Founder and CTO, and has launched two startups in the Netherlands. Mark became a Microsoft Certified Trainer in 2005. Today he uses his extensive knowledge to help tech professionals with their leadership, communication, and technical skills.

See full profile

Technology Mobile Development Csharp
Report class