Thread.ActiveCount Method

Definition

Returns an estimate of the number of active threads in the current thread's java.

[Android.Runtime.Register("activeCount", "()I", "")]
public static int ActiveCount ();
[<Android.Runtime.Register("activeCount", "()I", "")>]
static member ActiveCount : unit -> int

Returns

an estimate of the number of active threads in the current thread's thread group and in any other thread group that has the current thread's thread group as an ancestor

Attributes

Remarks

Returns an estimate of the number of active threads in the current thread's java.lang.ThreadGroup thread group and its subgroups. Recursively iterates over all subgroups in the current thread's thread group.

The value returned is only an estimate because the number of threads may change dynamically while this method traverses internal data structures, and might be affected by the presence of certain system threads. This method is intended primarily for debugging and monitoring purposes.

Java documentation for java.lang.Thread.activeCount().

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