Archive Post
Home / Defining Tasks That Return a Result
Reentrant Lock 3 – Concurrency: Part II
Example 23.12 illustrates using a reentrant lock to implement a thread-safe counter. The class ReentrantLockCounter…
Reentrant Read-Write Lock 2 – Concurrency: Part II
In Example 23.13, the class ReentrantRWLockCounter implements a thread-safe counter using a ReentrantReadWriteLock. It is…
Reentrant Read-Write Lock – Concurrency: Part II
Reentrant Read-Write Lock The explicit lock implemented by the ReentrantLock class is mutually exclusive—that is,…
Special-Purpose Synchronizers 2 – Concurrency: Part II
Example 23.14 illustrates using a single cyclic barrier that is shared by three threads. The…
Synchronized Collections and Maps – Concurrency: Part II
23.6 Synchronized Collections and Maps The primary goal of the Collections Framework is to provide…
Serial Access – Concurrency: Part II
Serial Access In order to guarantee thread-safety, all access to elements of the underlying collection…