Works like calling @lock for this depth times.
depth
Use @lock
a StaticRecMutex to lock.
number of times this mutex has to be unlocked to be completely unlocked.