Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

The std::shared_mutex is a std::mutex variant that supports two types of locks: an exclusive lock that can be held by only one thread and a shared lock that can be held by any number of threads (as long as the exclusive lock is not held). The typical use case for exclusive/shared lock semantics is a shared resource with read/write access. A mutating operation requires exclusive access to the resource, while non-mutating operations can co-exist (run in parallel) with other non-mutating operations. Compiler Explorer link: https://lnkd.in/eFfB8NcZ #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text

To view or add a comment, sign in

Explore content categories