A shared recursive mutex in standard C++
Recursive property of the mutex operates with the term “owner“, which in case of a shared_mutex is not well-defined: several threads may have .lock_shared() called at the same time. Assuming “owner” to be a thread which calls .lock() (not .lock_shared()!), an implementation of the recursive shared mutex can be simply derived from shared_mutex: class shared_recursive_mutex: … Read more