ReentrantLock in Java

A Reentrant lock is an implementation of java.util.concurrent.Lock interface with the same basic behavior and semantics as the implicit monitor lock accessed using synchronized methods and statements, but with extended capabilities. Lock is acquired by lock() method and held by Thread until a call to unlock() method. ReentrantLock provides same Continue Reading…