Lock
Interface Lock
- All Known Implementing Classes:
- ReentrantLock, ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
public interface Lock
Lock
implementations provide more extensive locking operations than can be obtained using synchronized
methods and statements. They allow more flexible structuring, may have quite different properties, and may support multiple associated Condition
objects.
A lock is a tool for controlling access to a shared resource by multiple threads. Commonly, a lock