Chapter 13. Doing Several Things at Once: Threads

  • What Are Threads?

  • Two Ways to Obtain a New Thread

  • The Lifecycle of a Thread

  • Thread Groups

  • Four Kinds of Threads Programming

  • Some Light Relief—The Motion Sensor Solution

Multithreading is not a new concept in software, but it is new to come into the limelight. People have been kicking around experimental implementations for 20 years or more, but it is only in the last few years that desktop hardware (especially desktop multiprocessors) became powerful enough to make multithreading popular.

There is a POSIX[1] document 1003.4a (ratified June 1995) that describes a threads API standard. The threads described by the POSIX model and the threads available in Java do not completely coincide. ...

Get Just Java™ 2 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.