Course curriculum

  • 01

    Introduction

    • Course overview

    • BenchmarkDotNet basics

    • Demo: sharplab.io

    • Demo: ConcurrencyVisualizer

    • Demo: Parallel Stacks/Tasks

    • Homework

  • 02

    Threading

    • Threads

    • ThreadPool

    • Demo: ThreadPool use with different API

    • Demo: ThreadPool.BindHandle usage

    • Homework

  • 03

    Async basics

    • Task API

    • Async-await foundations

    • Async eliding

    • ValueTask

    • Task API and async

    • Homework

  • 04

    Async II

    • Execution, contexts, scheduler

    • Sync vs async

    • Fire and forget

    • TaskCompletionSource

    • Awaitables

    • Locals

    • Homework

  • 05

    Async III

    • Tasks aggregations

    • IAsyncDiposable

    • IAsyncEnumerable

    • Demo: gRPC with IAsyncEnumerable

    • Demo: New SQL client

    • Demo: Timeout with WhenAny and WhenAll

    • Homework

  • 06

    Low-level concurrency

    • Hardware

    • volatile

    • Demo: Epoch programming in ConcurrentQueue

    • Interlocked

    • Demo: simple pool with Interlocked.Exchange

    • Barriers and alignment

    • Demo: range reservation with Aeron.NET and Interlocked.CompareExchange

    • Homework

  • 07

    Synchronization

    • Exclusive locking - part 1

    • Demo: decompiling lock

    • Exclusive locking - part 2

    • Demo: non-blocking usage of Monitor.TryEnter

    • Exclusive locking - part 03

    • Non-exclusive locking - part 1

    • Demo: task throttling with Task and SemaphoreSlim

    • Non-exclusive locking - part 2

    • Demo: Building custom string pool with ReaderWriterLock

    • Non-exclusive locking - part 3

    • Signalling

    • Asynchronous primitives - part 1

    • Demo: AsyncLock implementation

    • Asynchronous primitives - part 2

    • Homework

  • 08

    Concurrent Data Structures

    • Foundations

    • BlockingCollection

    • ConcurrentStack

    • Demo: object cache with ConcurrentStack

    • ConcurrentQueue

    • Demo: memory pool in Kestrel ASP.NET with ConcurrentQueue

    • ConcurrentDictionary

    • Demo: efficient caching with ConcurrentDictionary.GetOrAdd

    • ConcurrentBag

    • Homework

  • 09

    New Concurrent Data Structures

    • Introduction

    • Pipelines

    • Demo: TcpEcho

    • Channels

    • Demo: Usage of the Channel in ASP.NET Core

    • Homework

  • 10

    Miscellaneous topics

    • IValueTaskSource with Interlocked.CompareExchange

    • IValueTaskSource based on an array with token discriminator

    • ValueTask and pooling in .NET 5

    • ManualResetValueTaskSourceCore

    • False Sharing

    • Demo: Hosted services with IHostBuilder, IHostedService and ConcurrentQueue

    • F# async vs C# async

    • What's new in CancellationTokens for .NET 5 and beyond

    • Summary of the course

  • 11

    Webinars

    • Marc Gravell, webinar nr 1

    • Daniel Marbach, webinar nr 2

    • Steve Cleary, webinar nr 3

    • Daniel Marbach, webinar nr 4

    • Marc Gravell, webinar nr 5

    • Steve Cleary, webinar nr 6

    • Daniel Marbach, webinar nr 7