Semaphore
Java · 3 notes
- 6.20 Semaphorehistorical
1. What it is. A rate-limiting utility class that allows only n threads to access a resource at the same time. 2. Implementation analysis. 2.1. UML.
- 6.32 Nonfair Semaphorehistorical
1. What it is. Rate limiting using a nonfair strategy. 2. Usage. 3. Principle analysis: constructor, NonfairSync, acquire, shared acquisition through AQS, nonfair acquisition, release, and shared release.
- 6.39 Fair Semaphorehistorical
1. What it is. Rate limiting using a fair strategy. 2. Usage. 3. Principle analysis: constructor, FairSync, acquire, shared acquisition through AQS, fair acquisition, release, and shared release.