Copies into the specified array references to every active
subgroup in this thread group. If {@code recurse} is
{@code true}, this method recursively enumerates all subgroups of this
thread group and references to every active thread group in these
subgroups are also included.
<p> An application might use the
{@linkplain #activeGroupCount activeGroupCount} method to
get an estimate of how big the array should be, however <i>if the
array is too short to hold all the thread groups, the extra thread
groups are silently ignored.</i> If it is critical to obtain every
active subgroup in this thread group, the caller should verify that
the returned int value is strictly less than the length of
{@code list}.
<p> Due to the inherent race condition in this method, it is recommended
that the method only be used for debugging and monitoring purposes.
@param list
an array into which to put the list of thread groups
@param recurse
if {@code true}, recursively enumerate all subgroups
@return the number of thread groups put into the array
@throws SecurityException
if {@linkplain #checkAccess checkAccess} determines that
the current thread cannot access this thread group
Copies into the specified array references to every active subgroup in this thread group. If {@code recurse} is {@code true}, this method recursively enumerates all subgroups of this thread group and references to every active thread group in these subgroups are also included.
<p> An application might use the {@linkplain #activeGroupCount activeGroupCount} method to get an estimate of how big the array should be, however <i>if the array is too short to hold all the thread groups, the extra thread groups are silently ignored.</i> If it is critical to obtain every active subgroup in this thread group, the caller should verify that the returned int value is strictly less than the length of {@code list}.
<p> Due to the inherent race condition in this method, it is recommended that the method only be used for debugging and monitoring purposes.
@param list an array into which to put the list of thread groups
@param recurse if {@code true}, recursively enumerate all subgroups
@return the number of thread groups put into the array
@throws SecurityException if {@linkplain #checkAccess checkAccess} determines that the current thread cannot access this thread group