Use recursive mutexes