Introduction

Data structure is a basic element of programming. Almost every program uses one or more types of data structure to store and manage data. The Java API provides the Java Collections framework. It contains interfaces, classes, and algorithms that implement a lot of different data structures that you can use in your programs.

When you need to work with data collections in a concurrent program, you must be very careful with the implementation you choose. Most collection classes do not work with concurrent applications because they can't control concurrent access to their data. If a concurrent task shares a data structure that is unable to work with another concurrent task, you might have data inconsistency errors that will affect ...

Get Java 9 Concurrency Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.