Mutexes
suggest changeC++11 offers a selection of mutex classes, and later standards add more:
- std::mutex - offers simple locking functionality.
- std::timed_mutex - adds
try_lock_forandtry_lock_until. - std::recursive_mutex - allows recursive locking by the same thread.
- std::shared_timed_mutex (C++14) and std::shared_mutex (C++17) - offer shared and unique locking.
std::unique_lock, std::shared_lock, std::lock_guard
Strategies for lock classes std::try_to_lock, std::adopt_lock, std::defer_lock
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents