23. Concurrency

The most general definition of beauty...Multeity in Unity.

—Samuel Taylor Coleridge

Do not block the way of inquiry.

—Charles Sanders Peirce

Learn to labor and to wait.

—Henry Wadsworth Longfellow

Objectives

In this chapter you’ll:

Image Understand concurrency, parallelism and multithreading.

Image Learn the thread life cycle.

Image Use ExecutorService to launch concurrent threads that execute Runnables.

Use synchronized methods to coordinate access ...

Get Java™ How To Program (Early Objects), Tenth 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.