Understand asynchronous programming with .Net and C#
2.5 (49 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
892 students enrolled

Understand asynchronous programming with .Net and C#

Master the Thread API, the evolution to TPL with async and await, the use of parallel programming and Thread safety
2.5 (49 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
892 students enrolled
Last updated 7/2020
English [Auto]
Current price: $20.99 Original price: $29.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3.5 hours on-demand video
  • 2 articles
  • 5 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Why is asynchronous programming needed in the first place
  • Asynchronous programming concepts
  • All asynchronous programming techniques in .Net.
  • Thread Safety and Coordination
  • Threads, Tasks and async & await
  • Parallel Programming Framework (Pfx)
Course content
Expand all 50 lectures 03:36:46
+ What is asynchronous programming
4 lectures 18:54

Learn about the three concepts of asynchronous programming, starting with the first two in this video.

Preview 04:03

Let us check everything you learned in this first section.

Basics of asynchronous programming
2 questions

Learn in this video how we can utilize Threads for asynchronous programming, and how they work under the hood.

Preview 05:42

Use threads for asynchronous programming.

Threads as asynchronous programming mechanism
3 questions

Learn in this video what we will cover in this course and also what we did learn so far in the first chapter.

Course Contents and How to work with the course
+ Handle Threads in .Net
11 lectures 43:24

In this video we look at the topics of this chapter. We also peek at isolating data for a single Thread with the Thread Local Storage (TLS).

Introduction to Threads

Download the code for this chapter in this lecture

Code for the chapter

In this video we take our first focused look at the Thread API. We learn about the three different ways to supply a delegate to a thread instance and which one is the most useable.

Preview 08:17

Check your knowledge on how to start a thread

Start a Thread
2 questions

Learn in this video about all the ways a thread can be stopped and which of them are useful.

How to Stop a Thread

Learn in this video how to utilize Thread coordination to stop threads in a non harmful way.

Stop a Thread with Coordination

Test your knowledge about stopping a thread.

Stop a Thread
2 questions

Learn in this video the difference between foreground and background threads and what it is.

Create Foreground and Background Threads

Learn in this video how you can wait on a Result of any given thread with a concept called Thread Coordination. This is done with the Join Method of a thread instance, as we learn in this video.

Thread Coordination: Thread.Join

Learn in this video how foreground and background Threads behave if an exception is thrown, and how you should go about working with this in your code.

Error and Exception Handling with Threads

This video gives a short introduction to the idea of the threadpool or rather the reuse of threads without interfering directly with the thread API.

The Threadpool

In this video we are going to look at the 2 usual ways in the modern .Net development to enqueue work on the Thread pool.

The Threadpool: Examples for Enqueuing work to the threadpool

In this video we briefly summarize the contents of this chapter

Summary of Thread API

Make sure that you have this figured out. This includes all the fundamentals we need to understand to use all of the other concepts later on

Quiz Threads
4 questions
Use all the concepts about the Thread API in action !
Learn to handle the Thread API
1 question
+ Thread Safety and Coordination
11 lectures 54:21

In this video we will cover the basics about thread safety. It includes an illustration of a real life scenario that visualizes the issue with multithreaded code.

Introduction to concepts of thread safety

Download the code for this chapter, and see the folder structure in this lecture

Code for the chapter
Thread Safety
2 questions

Learn about what atomic means and what general issues we have with thread safety.

What does atomic mean in the context of thread safety?

In this video the Exclusive Locking idea is explained in general.

Exclusive Locking Mechanisms and atomic Operations

Examples for the correct use of the Monitor class and the locking statement. The workhorses for exclusive locking mechanisms with .Net.

.Net locking Workhorse: Monitor and lock

Learn in this video how non exclusive locking works, to allow multiple reads simultaneously, while only one Thread will be allowed to have write access.

Non-Exclusive Locking: The ReaderWriterLock(Slim)

Non exclusive locking with an example of the semaphore

Non-Exclusive Locking: The Semaphore(Slim)
Signaling between Threads with the Monitor

This video shows how to use signaling constructs like the ManualResetEvent and AutoResetEvent classes.

Signaling with Events: ManualResetEvent & AutoResetEvent

In this video we tackle the different concurrent collections we can use, and also learn why they are useful in the first place.

Concurrent Collections
Summary of Thread Safety
In this assignment you use the Thread safety mechanisms like locking and signaling to solve the two tasks at hand.
Learn to handle Thread Safety mechanisms
1 question
+ TPL - Task Parallel Library
13 lectures 49:20
Introduction to the TPL
Control Task behavior with the underlying Thread
Tasks and data
Create an I/O bound Tasks
Error Handling with Tasks
Task Relationships
Anything a Task: TaskCompletionSource
async & await 1: make async code look like synchronous one
async & await 2: All Method signatures
Task Combinators
Summary of the TPL

Test your knowledge on the abstraction over all the low level Threading classes and behaviors.

All about TPL
4 questions
+ Basics of Parallel Programming
6 lectures 21:33
Simple parallelism: Parallel.Invoke
For in Parallel: Parallel.For
ForEach in Parallel: Parallel.ForEach
Parallel Linq: PLINQ
Summary for Parallel Programming

Some questions for the section you just learned on parallel programming.

Quiz on Parallel Programming
2 questions
+ Bonus: General Things about asynchrony
5 lectures 18:50
Deadlock: an example

In this video we take a look at another thread signaling construct, the so called barrier class.

Another Signaling construct: The Barrier class
Basics: Delegates and Lambdas

Learn how to wrap a synchronous Api inside a Task to make it eligible in asynchronous and task based code.

Make a Legacy (synchronous) API asynchronous
  • Knowledge in C# is helpful, any other Object oriented language will do
  • General understanding of programming concepts
  • Interest in deeper knowledge about asynchronous programming

Have you ever had issues with a bug that resulted in an asynchronous programming wrong doing? Did your users report some unresponsive behavior of your application they did not want to deal with? Or does your boss want you to utilize the given hardware in the most efficient way possible?

If you had any of those or similar issues with asynchronous programming, this course will help you solve those issues. In other words this course will help you to handle multithreaded and concurrent scenarios in programming like  you always wanted to.

Besides looking at the underlying mechanisms, we will look at all the different techniques to utilize our freshly crafted knowledge.

This course not only gives you the well rounded background to understand what is going on with all that concurrency, parallelism and multi threading, but also hands over all the needed tools to you, that you will need to excel in this regard

It includes:

  • TPL with Tasks and async await keywords

  • The actual Thread API

  • Thread Safety with Locking, Non-exclusive locking and Concurrent Collections

  • Everything about how concurrency works under the hood

In this course you will also see examples to every of the above topics and this will guide you to become a master of asynchronous programming techniques with .Net.

So do not hesitate and enroll to:

  • Advance your career

  • Master one of the most needed skills of contemporary programming

If you still do not find any value here, you still have the 30 days refund.

Who this course is for:
  • .Net developers
  • Backend developers with .Net
  • C# Developers