How To Write Asynchronous C# Code With Tasks and PLINQ | Mark Farragher | Skillshare

How To Write Asynchronous C# Code With Tasks and PLINQ

Mark Farragher, Microsoft Certified Trainer

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

      2:32
    • About this course

      7:02
    • Introducing TPL and PLINQ

      6:17
    • How to start a thread

      8:52
    • Race conditions

      3:43
    • Resolve race conditions with thread locking

      7:55
    • The lock statement

      10:54
    • Thread synchronisation with AutoResetEvents

      14:30
    • How to start a task

      11:57
    • Working with tasks

      12:19
    • Initialising and cancelling tasks

      6:54
    • Parent and child tasks

      14:35
    • Task continuations

      12:37
    • When should you use tasks?

      8:10
    • When should you use PLINQ?

      7:21
    • Word reversal with PLINQ

      12:00
    • PLINQ and item ordering

      6:22
    • Limitations of PLINQ

      6:44
    • Course recap

      2:57

About This Class

682f7763

Today we have beautiful libraries for writing multi-threaded C#, and there is simply no excuse for writing bad asynchronous code. In this course I will teach you how to write rock-solid code using Tasks and Parallel LINQ that works perfectly on your first try.

I wrote a multi-threaded conversion utility a year ago that successfully migrated 100,000 documents from SharePoint 2010 to SharePoint 2013. The program worked flawlessly the first time because I used PLINQ.

Sound good?

Writing multi-threaded code by hand is hard. I’ll prove it to you by showing you some code that exchanges data between two threads. You will be surprised how difficult it is to do this reliably.

But then I’ll show you how trivially easy it is to write asynchronous C# code using the Task Parallel Library and Parallel LINQ. These amazing frameworks allow anyone to write robust multi-threaded code that can take a beating.

By the end of the course you will be fluent in both the Tasks Parallel Library and Parallel LINQ.

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. Working with Tasks and Parallel LINQ 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 asynchronous section of C# code in a lage project, and need to make sure your code scales reliably over multiple CPU cores? 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 asynchronous programming questions they might throw at you.

3

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