Concurrency - Thread Pools, Callables, and Synchronizers

This chapter includes 14 problems that involve Java concurrency. We will start with several fundamental problems about thread life cycles and object- and class-level locking. We then continue with a bunch of problems about thread pools in Java including the JDK 8 work-stealing thread pool. After that, we have problems dedicated to Callable and Future. Then, we dedicate several problems to Java synchronizers (for example, barrier, semaphore, and exchanger). By the end of this chapter, you should be familiar with the main coordinates of Java concurrency and be ready to continue with a set of advanced problems.

Get Java Coding Problems 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.