Learn Parallel Programming with C# and .NET
4.6 (103 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,003 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn Parallel Programming with C# and .NET to your Wishlist.

Add to Wishlist

Learn Parallel Programming with C# and .NET

Discover the core multithreading and parallelization concepts supported by the .NET framework.
Bestselling
4.6 (103 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,003 students enrolled
Created by Dmitri Nesteruk
Last updated 7/2017
English
Current price: $10 Original price: $50 Discount: 80% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 4 hours on-demand video
  • 1 Article
  • 29 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Create and run independent tasks
  • Manage synchronized access to data
  • Effectively use parallel collections
  • Work with task continuations
  • Write parallel loops
  • Leverage the power of Parallel LINQ
View Curriculum
Requirements
  • Basic knowledge of C# and .NET framework
  • Basic knowledge of multithreading
Description

This course is about .NET Parallel Programming with C# and covers the core multithreading facilities in the .NET Framework, namely the Task Parallel Library (TPL) and Parallel LINQ (PLINQ).

This course will teach you about:

  • Task Programming: how to create and run tasks, cancel them, wait on them and handle exceptions that occur in tasks.
  • Data Sharing and Synchronization, ensuring your access to shared data also happens in a safe and consistent manner.
  • Concurrent Collections, such as ConcurrentBag, which operate correctly even when accessed from multiple threads.
  • Task Coordination concepts, including the idea of continuations, as well as uses of synchronization primitives to coordinate tasks.
  • Parallel Loops which let you easily iterate over a counter or collection while partitioning the data and processing it on separate threads.
  • Parallel LINQ, the parallel version of .NET's awesome Language-Integrated Query (LINQ) technology.

This course is suitable for:

  • Beginner and experienced .NET/C# developers
  • Anyone interested in multi-threading and parallelism

The course consists of the following materials:

  • Video lectures showing hands-on programming
  • C# files that you can download and run

Before taking the course, you should be comfortable with the C# programming language and familiar with multi-threading.

Who is the target audience?
  • Beginner and experienced .NET developers
  • Computer Science students
  • Anyone interested in modern approaches to multithreading/parallelism
Students Who Viewed This Course Also Viewed
Curriculum For This Course
44 Lectures
04:14:08
+
Course Introduction
1 Lecture 02:37

Some information about the course author, what the course contains, how the material is presented and what you need to know before taking part in the course.

Preview 02:37
+
Task Programming
7 Lectures 46:26

An overview of all the lectures in this section.

Overview
00:49

An introduction to the Task abstraction, with examples of how to create and start tasks.

Preview 10:11

A look at .NET's special CancellationTokenSource and CancellationToken classes that are used to cooperatively cancel running tasks.

Cancelling Tasks
11:50

If you're inside a task and want to wait a while, there are ways to do this besides Thread.Sleep().

Waiting for Time to Pass
04:32

How to wait on a single task or, indeed, a set of tasks.

Waiting for Tasks
06:51

If an exception is thrown inside a Task, who catches it, and how?

Exception Handling
05:25

A summary of key concepts from this section's lectures.

Summary
06:48
+
Data Sharing and Synchronization
7 Lectures 50:44

An overview of the lectures in this section.

Overview
03:10

The lock keyword and what it means.

Critical Sections
06:31

Atomic operations on primitive values.

Interlocked Operations
04:45

A lock that doesn't yield.

Spin Locking and Lock Recursion
09:30

One of the key WaitHandle-based synchronization structures.

Mutex
12:11

A look at reader-writer locks, including upgradeability and recursion support.

Reader-Writer Locks
09:56

A summary of the lectures in this section.

Summary
04:41
+
Concurrent Collections
7 Lectures 41:10

An overview of lectures in this section.

Overview
01:11

A thread-safe dictionary.

ConcurrentDictionary
14:08

A thread-safe queue.

ConcurrentQueue
02:54

A thread-safe stack.

ConcurrentStack
04:01

A collection which is similar, in principle, to a thread-safe List except it doesn't preserve the order. Thus it's called a Bag.

ConcurrentBag
05:46

BlockingCollection is a special wrapper around the producer-consumer collection that is capable of blocking the producer thread until a value is available, and is capable of exposing a 'consuming enumerable' that blocks the consumer until there's an item for it to consume.

BlockingCollection and the Producer-Consumer Pattern
11:22

A summary of materials from the lectures in this section.

Summary
01:48
+
Task Coordination
8 Lectures 46:05

An overview of lectures in this section.

Overview
01:27

Different forms of continuations exist.

Continuations
05:29

Child tasks are tasks whose lifetime are joined to those of the parent.

Child Tasks
06:17

A useful sync primitive for coordinating multi-phase algorithms.

Barrier
09:22

A simple sync primitive with a counting-down value.

CountdownEvent
05:29

Ordinary signals which, depending on whether they are set or not, block or unblock a thread.

ManualResetEventSlim and AutoResetEvent
07:03

A complicated sync data structure which allows increasing/decreasing a counter to control how many threads can be executing at the same time.

SemaphoreSlim
05:22

A summary of materials from the lectures in this section.

Summary
05:36
+
Parallel Loops
6 Lectures 37:48

An overview of lectures in this section.

Overview
01:19

Parallel loops... what could be simpler?

Parallel Invoke/For/ForEach
08:25

Learn to break out of or cancel parallel loops, and what happens if an exception is thrown.

Breaking, Cancellations and Exceptions
09:41

Concurrent access from all tasks on each iteration to a variable is very inefficient. Why not access it once per task, and keep a task-local store of intermediate results that incurs no sync overhead?

Thread Local Storage
06:54

Creating a delegate on each Task invocation is inefficient, but if we tell .NET how we want to partition data, we may end up with a much faster method.

Partitioning
07:45

A summary of materials from the lectures in this section.

Summary
03:44
+
Parallel LINQ
8 Lectures 29:22

An overview of lectures in this section.

Overview
01:40

AsParallel() turns an IEnumerable<T> into a ParallelQuery<T>

AsParallel and ParallelQuery
08:55

Just like with Task and Parallel.Xxx, PLINQ takes cancellation tokens and throws either AggregateException or OperationCancelledException.

Cancellation and Exceptions
06:24

How quickly do you want your data? Or should PLINQ cluster results together and return them in batches?

Merge Options
04:20

LINQ Aggregate() function has a special PLINQ overload.

Custom Aggregation
04:26

Summary
01:16

A summary of materials from the lectures in this section.

Course Summary
02:04

Links to my other courses.

Bonus Lecture: Other Courses at a Discount
00:17
About the Instructor
Dmitri Nesteruk
4.5 Average rating
1,003 Reviews
10,288 Students
14 Courses
Quant Finance • Algotrading • Software/Hardware Engineering

Dmitri Nesteruk is a developer, speaker and podcaster. His interests lie in software development and integration practices in the areas of computation, quantitative finance and algorithmic trading. His technological interests include C#, F# and C++ programming as well high-performance computing using technologies such as CUDA. He has been a C# MVP since 2009.

Dmitri is a graduate of University of Southampton (B.Sc. Computer Science) where he currently holds a position as a Visiting Researcher. He is also an instructor on an online intro-level Quantitative Finance course, and has also made online video courses on CUDA, MATLAB, D, the Boost libraries and other topics.