I Proudly present my Book is Ready “Concurrency with Modern C++”

Concurrency with Modern C++ is a 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: Concurrency with Modern C++

What’s Inside?

This book explains you the details to 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.


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.


    Because this book 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
      • Conventions
      • Source Code
        • Run the Programs
      • How you should read the book?
      • Personal Notes
        • Acknowledgements
        • About Me
        • My Special Circumstances
    • A Quick Overview
      • Concurrency with Modern C++
        • C++11 and C++14: The foundation
          • Memory Model
          • Multithreading
        • Case Studies
          • Calculating the Sum of a Vector
          • Thread-Safe Initialisation of a Singleton
          • Ongoing Optimisation with CppMem
        • C++17: Parallel Algorithms of the Standard Template Library
          • Execution Policy
          • New Algorithms
        • C++20: The Concurrent Future
          • Atomic Smart Pointers
          • Extended futures
          • Latches and Barriers
          • Coroutines
          • Transactional Memory
          • Task Blocks
        • Challenges
        • Best Practices
        • Time Library
        • Glossary
    • The Details
      • Memory Model
        • The Contract
          • The Foundation
          • The Challenges
        • Atomics
          • Strong versus Weak Memory Model
          • The Atomic Flag
          • The Class Template std::atomic
          • User Defined Atomics
          • All Atomic Operations
          • Free Atomic Functions
          • std::shared_ptr
        • The Synchronisation and Ordering Constraints
          • The six variants of the C++ memory model
          • Sequential Consistency
          • Acquire-Release Semantic
          • std::memory_order_consume
          • Relaxed Semantic
        • Fences
          • Fences as Memory Barriers
          • The three Fences
          • Acquire-Release Fences
          • Synchronisation with Atomic Variables or Fences
      • Multithreading
        • Threads
          • Creation
          • Lifetime
          • Arguments
          • Methods
        • Shared Data
          • Mutexes
          • Locks
          • Thread-safe Initialisation
        • Thread-Local Data
        • Condition Variables
          • The Wait Workflow
          • Lost Wakeup and Spurious Wakeup
        • Tasks
          • Threads versus Tasks
          • std::async
          • std::packaged_task
          • std::promise and std::future
      • Case Studies
        • Calculating the Sum of a Vector
          • Single Threaded addition of a Vector
          • Multithreaded Summation with a Shared Variable
          • Thread-Local Summation
          • Summation of a Vector: The Conclusion
        • Thread-Safe Initialisation of a Singleton
          • Double-Checked Locking Pattern
          • My Strategy
          • Thread-Safe Meyers Singleton
          • std::call_once with the std::once_flag
          • Atomics
          • Performance Numbers of the various Thread-Safe Singleton Implementations
        • Ongoing Optimisation with 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
      • Parallel Algorithms of the Standard Template Library
        • Execution Policies
        • Algorithms
          • The functional Heritage
      • The Future: C++20
        • Atomic Smart Pointers
          • A thread-safe singly linked list
        • Extended Futures
          • std::future
          • std::async, std::packaged_task, and std::promise
          • Creating new Futures
        • Latches and Barriers
          • std::latch
          • std::barrier
          • std::flex_barrier
        • Coroutines
          • A Generator Function
          • Details
        • Transactional Memory
          • ACI(D)
          • Synchronized and Atomic Blocks
          • transaction_safe versus transaction_unsafe Code
        • Task Blocks
          • Fork and Join
          • define_task_block versus define_task_block_restore_thread
          • The Interface
          • The Scheduler
    • Further Information
      • Challenges
        • ABA
        • Blocking Issues
        • Breaking of Program Invariants
        • Data Races
        • False Sharing
        • Lifetime Issues of Variables
        • Moving Threads
        • Deadlocks
        • Race Conditions
      • Best Practices
        • General
          • Code Reviews
          • Minimise Data Sharing of mutable data
          • Minimise Waiting
          • Prefer Immutable Data
          • Look for the Right Abstraction
          • Use Static Code Analysis Tools
        • Memory Model
          • Don’t use volatile for synchronisation
          • Don’t program Lock Free
          • If you program Lock-Free, use well-established patterns
          • Don’t build your own abstraction, use guarantees of the language
        • Multithreading
          • Threads
          • Data Sharing
          • Condition Variables
          • Promises and Futures
      • The Time Library
        • The Interplay of Time Point, Time Duration, and Clock
        • Time Point
          • From Time Point to Calendar Time
          • Cross the valid Time Range
        • Time Duration
          • Calculations
        • Clocks
          • Accuracy and Steadiness
          • Epoch
        • Sleep and Wait
      • Glossary
        • ACID
        • Callable Unit
        • Concurrency
        • Critical Section
        • Function Objects
        • Lambda Functions
        • Lock-free
        • Lost Wakeup
        • Modification Order
        • Monad
        • Non-blocking
        • Parallelism
        • Predicate
        • RAII
        • Sequential Consistency
        • Sequence Point
        • Spurious Wakeup
        • Thread
        • Total order
        • volatile
        • wait-free
    • Index



    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, Matthieu Bolt, Stephen Kelley, Kyle Dean, Tusar Palauri, Dmitry Farberov, 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, and Philipp Lenk.

    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 *