Chapter 4. Lifecycle
Thread Lifecycle
APIs Used in This Chapter
The Class java.lang.Thread
The Class Extensions.InterruptibleThread
The Interface java.lang.Runnable
In which the reader is treated to a comprehensive explanation of the intricacies in the life of a thread—birth, life, and death— even death by vile cancellation. A small program that illustrates all these stages concludes the chapter.
Thread Lifecycle
The fundamental paradigm of threads is the same in all the libraries. In each, the program starts up in the same fashion as single-threaded programs always have—loading the program, linking in the dynamic libraries, running any initialization sections, and finally, starting a single thread running main()
(the main thread). The main function ...
Get Multithreaded Programming with JAVA™ Technology 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.