I’m Proud to Present: Modern C++ Concurrency is available as interactive course

Based on my book “Concurrency with Modern C++” created an interactive course. You can have it now at a discount of 38 %.

“Modern C++ Concurrency” is an interactive journey through current and upcoming concurrency in C++.

  • C++11 and C++14 have the basic building blocks for creating concurrent or parallel programs.
  • With C++17 we got the parallel algorithms of the Standard Template Library (STL). That means, most of the algorithms of the STL can be executed sequential, parallel, or vectorized.
  • The concurrency story in C++ goes on. With C++20 we can hope for extended futures, coroutines, transactions, and more.



How to Get it?

Use the link to educative: Modern C++ Concurrency: Get the most out of any machine

What’s Inside?

  • 140 lessons
  • 110 code playgrounds => Run in browser
  • 78 code snippets
  • 55 illustrations

This interactive course explains the details of concurrency in modern C++ and gives you, in addition, more than 100 running code examples. Therefore you can combine the theory with the practices and get the most of it.

Because this interactive course is about concurrency, I present a lot of pitfalls and show you how to overcome them.

Give me the Details!

If you are curious and you should be, here are the details to the more than 300 pages:

  • Introduction

    • Guide to Follow this Course
  • A Quick Overview

  • Memory Model: The Contract

    • The Contract
    • The Foundation & Challenges
  • Memory Model: Atomics

    • Strong Memory Model
    • Weak Memory Model
    • The Atomic Flag
    • Spinlock vs. Mutex
    • std::atomic<bool>
    • User-Defined Atomics
    • All Atomic Operations
    • Free Atomic Functions
    • Atomic Operations on std::shared_ptr
  • Memory Model: Synchronization and Ordering Constraints

    • Introduction
    • Types of Synchronization & Ordering Constraints
    • Sequential Consistency
    • Acquire Release Semantic
    • Is Acquire-Release Semantic Transitive?
    • Acquire Release: The Typical Misunderstanding
    • std::memory_order_consume
    • Data dependencies with std::memory_order_consume
    • Relaxed Semantic
  • Memory Model: Fences

    • Fences as Memory Barriers
    • The Three Fences
    • Acquire Release Fences
    • Synchronization with Atomic Variables
    • Synchronization with Fences
  • Multithreading: Threads

    • Introduction to ThreadsPreview
    • Creation of Threads
    • Managing Thread Lifetime
    • Thread Lifetime Management: Warnings and Tips
    • Passing Arguments to Threads
    • Arguments of Threads: Undefined behaviour
    • Arguments of Threads – Race Conditions and Locks
    • Methods of Threads
    • Methods of Threads in Practice
  • Multithreading: Shared Data

    • Introduction to Shared Data
    • Introduction to Mutexes
    • Mutex Types and Locking Methods
    • Issues of Mutexes: Deadlocks
    • Issues of Mutexes: Avoiding Exceptions
    • Types of Locks: std::lock_guard
    • Types of Locks: std::unique_lock
    • Types of Locks: std::shared_lock
    • Thread-Safe Initialization
    • Thread-Safe Initialization: Constant Expressions
    • Thread-Safe Initialization: call_once and once_flag
    • Thread-Safe Initialization – Static Variables with Block Scope
  • Multithreading: Local Data

    • Thread Local Data
  • Multithreading: Condition Variables

    • Condition Variables
    • The Caveats of Condition Variables
  • Multithreading: Tasks

    • Introduction to Tasks
    • Threads vs Tasks
    • Introduction to std::async
    • async: Start Policy
    • async: Fire and Forget
    • async: Concurrent Calculation
    • Introduction to std::packaged_task
    • Introduction to Promises and Futures
    • Promise and Future: Return an Exception
    • Promise and Future: Return a Notification
    • Introduction to std::shared_future
  • Case Study: Calculate Sum of a Vector

    • Introduction
    • Single Threaded Summation: Ranged Based for Loops
    • Single Threaded Summation: Addition with std::accumulate
    • Single Threaded Summation: Protection with Locks
    • Single Threaded Summation: Protection with Atomics
    • Multithreaded Summation: Using std::lock_guard
    • Multithreaded Summation: Using Atomic Variable
    • Multithreaded Summation: Using fetch_add Method
    • Multithreaded Summation: Using fetch_add Method with Relaxed Semantic
    • Thread Local Summation: Using Local Variable
    • Thread Local Summation: Using an Atomic Variable with Sequential Consistency
    • Thread Local Summation: Using an Atomic Variable with Relaxed Semantic
    • Thread Local Summation: Using Thread Local Data
    • Thread Local Summation: Using Tasks
    • Calculate Sum of a Vector: Conclusion
  • Case Study: Thread-Safe Initialization of a Singleton

    • Introduction
    • Double Checked Locking PatternPreview
    • Performance Measurement
    • Classical Meyers Singleton
    • Introduction to Thread Safe Meyers Singleton
    • Thread Safe Singleton: std::lock_guard
    • Thread Safe Singleton: std::call_once with std::once_flag
    • Thread Safe Singleton: Atomics
    • Conclusion
  • Case Study: Ongoing Optimization with CppMem

    • Introduction to CppMem
    • CppMem: An Overview
    • CppMem: Non-Atomic Variables
    • CppMem: Locks
    • CppMem: Atomics with Sequential Consistency
    • CppMem: Atomics with Acquire Release Semantic
    • CppMem: Atomics with Non-Atomics
    • CppMem: Atomics with Relaxed Semantic
    • Conclusion
  • Parallel Algorithms of the Standard Template Library

    • Execution Policies
    • Parallel & Vectorized Execution
    • Algorithms
    • The New Algorithms
    • New Algorithms – A Functional Perspective
  • The Future: C++20

    • Atomic Smart Pointers
    • Thread-Safe Linked List Using Atomic Pointers
    • Introduction to Extended Futures
    • Attaching Extended Futures
    • Creating New Futures
    • Latches and Barriers
    • Transactional Memory – An Overview
    • The Two Flavors of Transactional Memory
    • Introduction to Coroutines
    • Coroutines: More Details
    • Task Blocks
  • Coding Examples

    • ABA
    • Blocking Issues
    • Breaking of Program Invariants
    • Data Races
    • False Sharing
    • Lifetime Issues of Variables
    • Moving Threads
    • Deadlocks
    • Race Conditions
  • Best Practices

    • General
    • Memory Model
    • Multithreading: Threads
    • Multithreading: Shared Data
    • Multithreading: Condition Variables
  • The Time Library

    • The Interplay of Time Point, Time Duration, and Clock
    • Time Point
    • From Time Point to Calendar Time
    • Time Duration
    • Time Duration Calculations
    • Clocks
    • Sleep and Wait
  • Glossary

    • Glossary
    • Running Source Code on your own machine
  • About the Author

    • Personal Notes



Rainer D 6 P2 500x500Modernes C++ Mentoring

Be part of my mentoring programs:

  • "Fundamentals for C++ Professionals" (open)
  • "Design Patterns and Architectural Patterns with C++" (open)
  • "C++20: Get the Details" (open)
  • "Concurrency with Modern C++" (starts March 2024)
  • Do you want to stay informed: Subscribe.


    Modernes C++,






    Thanks a lot to my Patreon Supporters: Matt Braun, Roman Postanciuc, Tobias Zindl, G Prvulovic, Reinhold Dröge, Abernitzke, Frank Grimm, Sakib, Broeserl, António Pina, Sergey Agafyin, Андрей Бурмистров, Jake, GS, Lawton Shoemake, Jozo Leko, John Breland, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Robert Blanch, Truels Wissneth, Kris Kafka, Mario Luoni, Friedrich Huber, lennonli, Pramod Tikare Muralidhara, Peter Ware, Daniel Hufschläger, Alessandro Pezzato, Bob Perry, Satish Vangipuram, Andi Ireland, Richard Ohnemus, Michael Dunsky, Leo Goodstadt, John Wiederhirn, Yacob Cohen-Arazi, Florian Tischler, Robin Furness, Michael Young, Holger Detering, Bernd Mühlhaus, Stephen Kelley, Kyle Dean, Tusar Palauri, Juan Dent, George Liao, Daniel Ceperley, Jon T Hess, Stephen Totten, Wolfgang Fütterer, Matthias Grün, Phillip Diekmann, Ben Atakora, Ann Shatoff, Rob North, Bhavith C Achar, Marco Parri Empoli, moon, Philipp Lenk, Hobsbawm, Charles-Jianye Chen, and Keith Jeffery.

    Thanks, in particular, to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, Sudhakar Belagurusamy, Richard Sargeant, Rusty Fleming, John Nebel, Mipko, Alicja Kaminska, Slavko Radman, and David Poole.

    My special thanks to Embarcadero
    My special thanks to PVS-Studio
    My special thanks to 
    My special thanks to Take Up Code
    My special thanks to SHAVEDYAKS


    I’m happy to give online seminars or face-to-face seminars worldwide. Please call me if you have any questions.

    Standard Seminars (English/German)

    Here is a compilation of my standard seminars. These seminars are only meant to give you a first orientation.

    • C++ – The Core Language
    • C++ – The Standard Library
    • C++ – Compact
    • C++11 and C++14
    • Concurrency with Modern C++
    • Design Pattern and Architectural Pattern with C++
    • Embedded Programming with Modern C++
    • Generic Programming (Templates) with C++
    • Clean Code with Modern C++
    • C++20

    Online Seminars (German)

    Contact Me

    Modernes C++ Mentoring,



    0 replies

    Leave a Reply

    Want to join the discussion?
    Feel free to contribute!

    Leave a Reply

    Your email address will not be published. Required fields are marked *