ReentrantLock

This lesson explains usage of the ReentrantLock.

We'll cover the following...

If you are interviewing, consider buying our number#1 course for Java Multithreading Interviews.

The ReentrantLock implements the Lock interface and is functionally similar to the implicit monitor lock accessed using synchronized methods and statements.

The lock is said to be owned by the thread that locks it and any other thread attempting to lock the object will block. A thread that already owns the lock will return immediately if it invokes lock again. The reentrant behavior of the lock allows ...