std::recursive_mutex is a reentrant mutex. If a thread holds the mutex and tries to lock it again, it successfully locks it. The number of times lock is called, the same number of time unlock has to be called to make the mutex available to another thread.