Bonjour appears to require support for recursive mutexes.  So implement a simple recursive mutex.