Thinking Outside the Synchronization Quadrant | Kevlin Henney

Added:

Core Concepts
Concurrency Perils
Performance Reality
Reasoning Challenge
Code Qualities
Queue Design
Pipes Pattern
Actor Model

Core Concepts

0:09
Playing Section
  • 1

    Defines architecture as significant design decisions measured by change cost.

  • 2

    Introduces the synchronization quadrant: mutable vs. immutable, shared vs. unshared.

  • 3

    Highlights that shared mutable state creates a vortex pulling most code into it.

Basic C++ multi-threading concepts, including the use of 'std::thread', 'std::async', and 'std::future'.
Traditional lock-based synchronization mechanisms, including mutexes, lock guards, and the associated risks of deadlocks and data races.
The concept of shared mutable state and how concurrent access to memory affects program correctness.
Familiarity with fundamental modern C++ features (C++11 through C++20), particularly 'const' correctness and value semantics.
Practical implementation of the Actor Model in C++ using specialized libraries such as the C++ Actor Framework (CAF).
Lock-free and wait-free programming techniques using low-level atomics ('std::atomic') and memory barriers.
Communicating Sequential Processes (CSP) and channel-based concurrency, drawing parallels to models used in Go and Rust.
Architecting distributed, event-driven systems that leverage message-passing instead of shared-memory concurrency for horizontal scalability.
Investigating Software Transactional Memory (STM) as an alternative paradigm for managing shared state.
31.5K views394likes1:07:43@NDCOriginal Release: 2017-02-27

Concurrency programming should move beyond the default synchronization quadrant (mutable, shared data requiring locks) to embrace immutability, actors, and message-passing patterns, which enable sequential reasoning, better testability, and avoid the pitfalls of race conditions and deadlocks that plague lock-based concurrent code.