lock
an archive of posts with this tag
-
Mutexes and RAII-based locking
Why does data break when several threads touch it at once? The mutex that prevents race conditions, exception-safe RAII locking (lock_guard and unique_lock), and shared_mutex, which distinguishes reads from writes.