23. Multithreading

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

Samuel Taylor Coleridge

Do not block the way of inquiry.

Charles Sanders Peirce

A person with one watch knows what time it is; a person with two watches is never sure.

Proverb

Learn to labor and to wait.

Henry Wadsworth Longfellow

The world is moving so fast these days that the man who says it can’t be done is generally interrupted by someone doing it.

Elbert Hubbard

Objectives

In this chapter you will learn:

  • What threads are and why they are useful.

  • How threads enable you to manage concurrent activities.

  • The life cycle of a thread.

  • Thread priorities and ...

Get Java™ How to Program, Seventh 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.