When a thread acquires a lock it must make sure to unlock it again;
-failing to do so can lead to deadlocks. If a lock allows a thread to acquire
+failing to do so can lead to deadlocks. If a lock allows a thread to acquire
it multiple times, for example java.util.concurrent.locks.ReentrantLock,
then the number of locks must match the number of unlocks in order to fully
release the lock.
+Any class that has both lock and unlock methods is
+considered a lock type. However, classes with names ending in "Pool" are excluded,
+as they typically manage a collection of resources.
+
It is recommended practice always to immediately follow a call to lock
with a try block and place the call to unlock inside the
-finally block. Beware of calls inside the finally block
+finally block. Beware of calls inside the finally block
that could cause exceptions, as this may result in skipping the call to unlock.