The RWTRecursiveLock Class
The RWTRecursiveLock template class converts other mutex classes, such as RWMutexLock or RWFIFOMutexLock, into a mutex that supports recursive acquisition semantics.
A thread acquires ownership of a recursive mutex the first time acquire() is called. Any subsequent calls to acquire() without an intervening call to release() cause an internal acquire-count value to be incremented. The internal count is used to ensure that a recursive mutex is released as many times as it was acquired before ownership is relinquished.
The RWTRecursiveLock template class is most useful for building monitors that allow one member function to call another member function in the same instance without producing deadlock.