ReadWriteLock
Interface ReadWriteLock
- All Known Implementing Classes:
- ReentrantReadWriteLock
public interface ReadWriteLock
A ReadWriteLock
maintains a pair of associated locks
, one for read-only operations and one for writing- The read lock
may be held simultaneously by multiple reader threads, so long as there are no writers. The write lock
is exclusive.
All ReadWriteLock
implementations must guarantee that the memory synchronization effects of writeLock
operations (as specified in the 登录查看完整内容