23.10 Concurrent Collections
In Chapter 16, we introduced various collections from the Java Collections API. We also mentioned that you can obtain synchronized versions of those collections to allow only one thread at a time to access a collection that might be shared among several threads. The collections from the java.util.concurrent package are specifically designed and optimized for sharing collections among multiple threads.
Figure 23.22 lists the many concurrent collections in package java.util.concurrent. The entries for ConcurrentHashMap and LinkedBlockingQueue are shown in bold because these are by far the most frequently used concurrent collections. Like the collections introduced in Chapter 16, the concurrent collections have been ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access