The std::recursive_mutex is a mutex variant that can be locked multiple times by the same thread. Other threads can only acquire a lock on the mutex after all held locks have been released. This can significantly simplify code where several functions need to acquire the lock and call each other. Compiler Explorer link: https://lnkd.in/e2_wRqqe #cpp #cplusplus #coding #programming #dailybiteofcpp
This is very helpful!
Very helpful!
KeyValue Software Systems•2K followers
1yIsn’t this called a re-entrant mutex as well?