std::mutex vs std::recursive_mutex as class member
问题 I have seen some people hate on recursive_mutex : http://www.zaval.org/resources/library/butenhof1.html But when thinking about how to implement a class that is thread safe (mutex protected), it seems to me excruciatingly hard to prove that every method that should be mutex protected is mutex protected and that mutex is locked at most once. So for object oriented design, should std::recursive_mutex be default and std::mutex considered as an performance optimization in general case unless it