Java Reference
In-Depth Information
Equivalent to invoking the method enumerate(threadsInGroup)
on the THReadGroup of the current thread.
The ThreadGroup class also supports a method that is invoked when a
thread dies because of an uncaught exception:
public void uncaughtException(Thread thr, Throwable exc)
We'll look at this in more detail in the next section.
Exercise 14.9 : Write a method that takes a thread group and starts
a thread that periodically prints the hierarchy of threads and thread
groups within that group, using the methods just described. Test it with
a program that creates several short-lived threads in various groups.
 
Search WWH ::




Custom Search