6.ReentrantLock
Java · 3 notes
- 6.6 6.ReentrantLockhistorical
What ReentrantLock is, comparison with synchronized, implementation principle, and references.
- 6.26 Fair Lockhistorical
A fair lock follows the first-come, first-served principle. Even after the lock has been released, a later-arriving thread cannot barge in; it must wait until nobody is ahead of it. 1. Usage. 2. Principle analysis.
- 6.34 Nonfair Lockhistorical
A nonfair lock allows any arriving thread to compete for the lock once it has been released, regardless of arrival order. 1. Usage. 2. Implementation principles.