Skip to content

Latest commit

 

History

History
396 lines (238 loc) · 16.8 KB

File metadata and controls

396 lines (238 loc) · 16.8 KB

Concurrency and parallelism

Table of contents


Introduction and overview

🔗



SIMD

🎥

SIMD within a register (SWAR)

🔗


Multithreading

🔗

🎥

📖

📄

Memory model

🔗

🎥

Concurrency and the standard library

🔗

🎥

std::atomic

🎥

std::atomic_shared_ptr

🔗

std::condition_variable

The std::condition_variable is a synchronization primitive that can be used to block a thread, or multiple threads at the same time, until another thread both modifies a shared variable (the condition), and notifies the std::condition_variable.

std::mutex

The std::mutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.

std::promise / std::future

The std::promise provides a facility to store a value or an exception that is later acquired asynchronously via a std::future object created by the std::promise object.

std::async

🔗

std::thread

std::lock_guard

Data races and race conditions

Lock-based

Mutex locks

🔗

Spin locks

🔗

Lock-free

Lock-free programming is a set of techniques for writing concurrent programs without using explicit locks.

🎥

Atomic smart pointers

🎥

Hazard pointers

🔗

Read-copy-update (RCU)

🔗

🎥

Lock-free queues (FIFO)

🎥

POSIX threads

🔗

Executors

🎥

Concurrency patterns

See Concurrency patterns – Patterns, idioms, and design principles.


Coroutines

🔗

🎥

Coroutines and the standard library

🎥

Generators

🎥

  • P.Novikov. Understanding C++ coroutines by example: Generators. Part I, Part II – CppCon (2022)

Asynchronous I/O

🎥

Exceptions

🔗


GPU computing

🎥