Skip to Content
Mastering C++ Programming
book

Mastering C++ Programming

by Jeganathan Swaminathan
September 2017
Beginner to intermediate
384 pages
8h 4m
English
Packt Publishing
Content preview from Mastering C++ Programming

Shared mutex

The shared mutex synchronization primitive supports two modes, namely shared and exclusive. In the shared mode, the shared mutex will allow many threads to share the resource at the same time, without any data race issues. And in the exclusive mode, it works just like regular mutex, that is, it will allow only one thread to access the resource. This is a suitable lock primitive if you have multiple readers that can access the resource safely and you allow only one thread to modify the shared resource. Refer to the chapter on C++17 for more details.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Multi-Paradigm Programming with Modern C++

Multi-Paradigm Programming with Modern C++

Georgy Pashkov

Publisher Resources

ISBN: 9781786461629Supplemental Content