Transactional Memory - An Overview

This lesson gives an outline of transactional memory, predicted to be introduced in C++20.

We'll cover the following

Transactional memory is based on the idea of a transaction from database theory. Transactional memory makes working with threads a lot easier for two reasons: first, data races and deadlocks disappear; second, transactions are composable.

A transaction is an action that has the following properties: Atomicity, Consistency, Isolation, and Durability (ACID). Except for the durability or storing the result of an action, all properties hold for transactional memory in C++. Now three short questions are left.


What do atomicity, consistency, and isolation mean for an atomic block consisting of some statements?

Get hands-on with 1000+ tech skills courses.