recall

← recall

reentrant lock term

lock the holder can re-acquire without deadlocking itself

Same thread takes the lock twice; second acquire succeeds. Counts depth. Useful when one locked method calls another locked method on the same object. Java's synchronized is reentrant; many systems' default mutexes are not.

aliases: recursive lock

topics: concurrency, locks

references: