Section 23.2 Thread States and Life Cycle

• A new thread begins its life cycle in the new state (p. 961). When the program starts the thread, it’s placed in the runnable state. A thread in the runnable state is considered to be executing its task.

• A runnable thread transitions to the waiting state (p. 961) to wait for another thread to perform a task. A waiting thread transitions to runnable when another thread notifies it to continue executing.

• A runnable thread can enter the timed waiting state (p. 961) for a specified interval of time, transitioning back to runnable when that time interval expires or when the event it’s waiting for occurs.

• A runnable thread can transition to the timed waiting state if it provides an optional wait interval ...

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.