Java Reference
In-Depth Information
Equivalent to enumerate(threadsInGroup,true) .
public int activeGroupCount()
Like activeCount , but counts groups, instead of threads, in all
subgroups. "Active" means "existing." There is no concept of
an inactive group; the term "active" is used for consistency
with activeCount .
public int enumerate(ThreadGroup[] groupsInGroup, boolean recurse)
Like the similar enumerate method for threads, but fills an array
of ThreadGroup references instead of THRead references.
public int enumerate(ThreadGroup[] groupsInGroup)
Equivalent to enumerate(groupsInGroup,true) .
You can also use a ThreadGroup to manage threads in the group. Invoking
interrupt on a group invokes the interrupt method on each thread in the
group, including threads in all subgroups. This method is the only way
to use a ThreadGroup to directly affect threadsthere used to be others but
they have been deprecated.
There are also two static methods in the Thread class to act on the cur-
rent thread's group. They are shorthands for invoking currentThread , in-
voking getThreadGroup on that thread, and then invoking the method on
that group.
public static int activeCount()
Returns the number of active threads in the current thread's
ThreadGroup .
public static int enumerate(Thread[] threadsInGroup)
 
Search WWH ::




Custom Search