Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

An Introduction to Multithreading in C++20

CppCon via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Explore multithreading in C++20 through this comprehensive conference talk from CppCon 2022. Dive into the fundamental tools and techniques for writing safe and efficient multithreaded programs. Learn about thread management, cancellation mechanisms, communication between threads, and synchronization primitives. Discover how to leverage C++20 features like jthread, stop tokens, latches, barriers, futures, and atomics. Gain insights into avoiding common pitfalls such as data races and deadlocks. Apply Amdahl's Law to understand performance gains in parallel algorithms and thread pools. Benefit from the expertise of Anthony Williams, a seasoned C++ developer and author specializing in multithreaded applications and libraries.

Syllabus

Introduction
Agenda
Why Multithreading
Amdahls Law
Parallel Algorithms
Thread Pools
Starting and Managing Threads
Cancelling Threads
Stop Requests
Stoppable
StopCallback
JThread
Destructor
Thread
References
Structure semantics
Stop source
Stop source API
Communication
Data Race
Latch
Constructor
Functions
Tests
Barrier
Structural Barrier
Template
Completion Function
Barrier Function
Futures
Promise
Future
Waiting
Promises
Exception
Async
Shared Future
Mutex
Does it work
Explicit destruction
Deadlock
Waiting for data
Busy wait
Unique lock
Notification
Semaphore
Number of Slots
Atomics
LockFree
Summary

Taught by

CppCon

Reviews

Start your review of An Introduction to Multithreading in C++20

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.