Copies into the specified array every active thread in this thread group. If
recurse
is
true
, this method recursively enumerates all subgroups of this thread group and references to every active thread in these subgroups are also included. If the array is too short to hold all the threads, the extra threads are silently ignored.
An application might use the activeCount method to get an estimate of how big the array should be, however if the array is too short to hold all the threads, the extra threads are silently ignored. If it is critical to obtain every active thread in this thread group, the caller should verify that the returned int value is strictly less than the length of list
.
Due to the inherent race condition in this method, it is recommended that the method only be used for debugging and monitoring purposes.