Share via


ThreadGroup.Enumerate Method

Definition

Overloads

Enumerate(Thread[])

Copies into the specified array every active thread in this thread group and its subgroups.

Enumerate(ThreadGroup[])

Copies into the specified array references to every active subgroup in this thread group and its subgroups.

Enumerate(Thread[], Boolean)

Copies into the specified array every active thread in this thread group.

Enumerate(ThreadGroup[], Boolean)

Copies into the specified array references to every active subgroup in this thread group.

Enumerate(Thread[])

Copies into the specified array every active thread in this thread group and its subgroups.

[Android.Runtime.Register("enumerate", "([Ljava/lang/Thread;)I", "GetEnumerate_arrayLjava_lang_Thread_Handler")]
public virtual int Enumerate (Java.Lang.Thread[]? list);
[<Android.Runtime.Register("enumerate", "([Ljava/lang/Thread;)I", "GetEnumerate_arrayLjava_lang_Thread_Handler")>]
abstract member Enumerate : Java.Lang.Thread[] -> int
override this.Enumerate : Java.Lang.Thread[] -> int

Parameters

list
Thread[]

an array into which to put the list of threads

Returns

the number of threads put into the array

Attributes

Remarks

Copies into the specified array every active thread in this thread group and its subgroups.

An invocation of this method behaves in exactly the same way as the invocation

<blockquote> #enumerate(Thread[], boolean) enumerate(list, true)</blockquote>

Added in 1.0.

Java documentation for java.lang.ThreadGroup.enumerate(java.lang.Thread[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Enumerate(ThreadGroup[])

Copies into the specified array references to every active subgroup in this thread group and its subgroups.

[Android.Runtime.Register("enumerate", "([Ljava/lang/ThreadGroup;)I", "GetEnumerate_arrayLjava_lang_ThreadGroup_Handler")]
public virtual int Enumerate (Java.Lang.ThreadGroup[]? list);
[<Android.Runtime.Register("enumerate", "([Ljava/lang/ThreadGroup;)I", "GetEnumerate_arrayLjava_lang_ThreadGroup_Handler")>]
abstract member Enumerate : Java.Lang.ThreadGroup[] -> int
override this.Enumerate : Java.Lang.ThreadGroup[] -> int

Parameters

list
ThreadGroup[]

an array into which to put the list of thread groups

Returns

the number of thread groups put into the array

Attributes

Remarks

Copies into the specified array references to every active subgroup in this thread group and its subgroups.

An invocation of this method behaves in exactly the same way as the invocation

<blockquote> #enumerate(ThreadGroup[], boolean) enumerate(list, true)</blockquote>

Added in 1.0.

Java documentation for java.lang.ThreadGroup.enumerate(java.lang.ThreadGroup[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Enumerate(Thread[], Boolean)

Copies into the specified array every active thread in this thread group.

[Android.Runtime.Register("enumerate", "([Ljava/lang/Thread;Z)I", "GetEnumerate_arrayLjava_lang_Thread_ZHandler")]
public virtual int Enumerate (Java.Lang.Thread[]? list, bool recurse);
[<Android.Runtime.Register("enumerate", "([Ljava/lang/Thread;Z)I", "GetEnumerate_arrayLjava_lang_Thread_ZHandler")>]
abstract member Enumerate : Java.Lang.Thread[] * bool -> int
override this.Enumerate : Java.Lang.Thread[] * bool -> int

Parameters

list
Thread[]

an array into which to put the list of threads

recurse
Boolean

if true, recursively enumerate all subgroups of this thread group

Returns

the number of threads put into the array

Attributes

Remarks

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 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.

Added in 1.0.

Java documentation for java.lang.ThreadGroup.enumerate(java.lang.Thread[], boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Enumerate(ThreadGroup[], Boolean)

Copies into the specified array references to every active subgroup in this thread group.

[Android.Runtime.Register("enumerate", "([Ljava/lang/ThreadGroup;Z)I", "GetEnumerate_arrayLjava_lang_ThreadGroup_ZHandler")]
public virtual int Enumerate (Java.Lang.ThreadGroup[]? list, bool recurse);
[<Android.Runtime.Register("enumerate", "([Ljava/lang/ThreadGroup;Z)I", "GetEnumerate_arrayLjava_lang_ThreadGroup_ZHandler")>]
abstract member Enumerate : Java.Lang.ThreadGroup[] * bool -> int
override this.Enumerate : Java.Lang.ThreadGroup[] * bool -> int

Parameters

list
ThreadGroup[]

an array into which to put the list of thread groups

recurse
Boolean

if true, recursively enumerate all subgroups

Returns

the number of thread groups put into the array

Attributes

Remarks

Copies into the specified array references to every active subgroup in this thread group. If recurse is true, this method recursively enumerates all subgroups of this thread group and references to every active thread group in these subgroups are also included.

An application might use the #activeGroupCount activeGroupCount method to get an estimate of how big the array should be, however if the array is too short to hold all the thread groups, the extra thread groups are silently ignored. 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 list.

Due to the inherent race condition in this method, it is recommended that the method only be used for debugging and monitoring purposes.

Added in 1.0.

Java documentation for java.lang.ThreadGroup.enumerate(java.lang.ThreadGroup[], boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to