Blocking Queues – Concurrency: Part II
Blocking Queues Queues (and deques) are the indisputable choice when choosing a collection to manage shared data in producer-consumer problems. The interfaces for thread-unsafe queues (Queue, Deque) in the java.util package have been enhanced in the java.util.concurrent package to provide a wide variety of blocking queues that are thread-safe (Figure 23.6). These thread-safe queues are