std::mutex vs std::recursive_mutex as class member
Most of the time, if you think you need a recursive mutex then your design is wrong, so it definitely should not be the default. For a class with a single mutex protecting the data members, then the mutex should be locked in all the public member functions, and all the private member functions should … Read more