std::mutex Isn’t Enough: 3 Rules for Using It Safely

Adding std::mutex does not automatically make C++ code thread-safe. This article breaks down three practical rules for using std::mutex safely: rely on RAII, keep synchronization boundaries explicit, and treat std::recursive_mutex as a design smell before treating it as a solution.

C++ Transactional Memory

Transactional memory looks like an elegant solution to concurrency problems — but in C++, it comes with serious trade-offs.

This article walks through GCC’s transactional memory implementation, explains how atomicity and rollback work in practice, and compares performance against mutex-based solutions. You’ll learn when transactional memory simplifies concurrent code — and when it makes things worse.