Skip to content

Glossary: System Design Basics in C++

mutex (std::mutex)

Also written: mutex, lock, std::mutex

A lock that lets only one thread at a time use shared data. It is used to guard shared data such as queues and stock counts, often through a `std::lock_guard` that unlocks automatically.

Where the book teaches it

Related terms

deadlockdata race