Module 09 of 12

Async & Concurrency

Lessons

About This Module

Modern applications rarely do just one thing at a time. They download data, read files, and respond to users while other work is still running. This module shows how C# lets you do that without freezing your program.

You will start with the difference between threads and tasks, then learn async and await for writing non-blocking code. After that you will see how to run work in parallel, and finish with the lock keyword for protecting shared data from race conditions.

Watch the lessons in order, then continue on to ASP.NET Core Web APIs.

Lessons

4 videos
01

C# Thread vs Task vs async/await Explained

Breaks down the difference between Thread, Task, and async/await in C# multithreading and asynchronous programming.

02

Async, Await and Task in C#.NET Explained with Daily Life Example

Explains the concept of async, await, and Task in detail, using an everyday example to make the idea easy to follow.

03

Task WhenAll vs Parallel ForEach

Compares Task.WhenAll and Parallel.ForEach and helps you choose the right one for your .NET 8 applications.

04

C# Lock Keyword Explained: Fix Race Conditions & Protect Shared Resources

Shows how multiple threads touching the same data can cause unpredictable bugs, and how the lock keyword keeps shared resources safe.