ThreadGroup.ActiveCount Method

Definition

Returns an estimate of the number of active threads in this thread group and its subgroups.

[Android.Runtime.Register("activeCount", "()I", "GetActiveCountHandler")]
public virtual int ActiveCount ();
[<Android.Runtime.Register("activeCount", "()I", "GetActiveCountHandler")>]
abstract member ActiveCount : unit -> int
override this.ActiveCount : unit -> int

Returns

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

Attributes

Remarks

Returns an estimate of the number of active threads in this thread group and its subgroups. Recursively iterates over all subgroups in this 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.

Added in 1.0.

Java documentation for java.lang.ThreadGroup.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