DEV Community

ReEntrant Locks

thewantedpk on May 01, 2020

How many of you still need to use (for non-ownership lock release) or have a code base which uses semaphores (shorturl.at/fjzPW) ? At least, I ha...
Collapse
 
moaxcp profile image
John Mercier

I think the synchronized keyword also works like a reentrant lock.

Collapse
 
kumarp03 profile image
thewantedpk

Yes, synchronized blocks are reentrant too !