23.1 Introduction

[Note: Sections marked “Advanced” are intended for readers who wish a deeper treatment of concurrency and may be skipped by readers preferring only basic coverage.] It would be nice if we could focus our attention on performing only one task at a time and doing it well. That’s usually difficult to do in a complex world in which there’s so much going on at once. This chapter presents Java’s capabilities for developing programs that create and manage multiple tasks. As we’ll demonstrate, this can greatly improve program performance.

When we say that two tasks are operating concurrently, we mean that they’re both making progress at once. Until recently, most computers had only a single processor. Operating systems on such computers ...

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.