November 2015
Intermediate to advanced
220 pages
4h 30m
English
CHAPTER 4
![]()
Additional Thread Capabilities
Chapters 1 through 3 introduced you to the java.lang.Thread class and java.lang.Runnable interface, to synchronization, and to waiting and notification. In this chapter, I complete my coverage of thread basics by introducing you to thread groups and thread-local variables. Also, I present the Timer Framework, which leverages Thread behind the scenes to simplify timer-oriented tasks.
Thread Groups
While exploring the Thread class, you’ve probably encountered references to the java.lang.ThreadGroup class in constructors such as Thread(ThreadGroup group, Runnable target), and in methods such as static int ...
Read now
Unlock full access