Android Guides | Samples

Java.Lang.ThreadGroup Class

ThreadGroup is a means of organizing threads into a hierarchical structure.

See Also: ThreadGroup

Syntax

[Android.Runtime.Register("java/lang/ThreadGroup", DoNotGenerateAcw=true)]
public class ThreadGroup : Object, Thread+IUncaughtExceptionHandler, IDisposable

Remarks

ThreadGroup is a means of organizing threads into a hierarchical structure. This class is obsolete. See Effective Java Item 73, "Avoid thread groups" for details.

See Also

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Lang.ThreadGroup are listed below.

See Also: Object

Public Constructors

Constructs a new ThreadGroup with the given name.
Constructs a new ThreadGroup with the given name, as a child of the given ThreadGroup.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

DaemonBoolean. Checks whether this thread group is a daemon ThreadGroup.
[read-only]
IsDestroyedBoolean. Checks whether this thread group has already been destroyed.
MaxPriorityInt32. Returns the maximum allowed priority for a Thread in this thread group.
[read-only]
NameString. Returns the name of this thread group.
[read-only]
ParentThreadGroup. Returns this thread group's parent ThreadGroup.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

ActiveCount() : Int32
Returns the number of running Threads which are children of this thread group, directly or indirectly.
ActiveGroupCount() : Int32
Returns the number of ThreadGroups which are children of this group, directly or indirectly.
AllowThreadSuspension(Boolean) : Boolean
Does nothing.
CheckAccess()
Does nothing.
Destroy()
Destroys this thread group and recursively all its subgroups.
Enumerate(Thread[]) : Int32
Iterates over all active threads in this group (and its sub-groups) and stores the threads in the given array.
Enumerate(ThreadGroup[]) : Int32
Iterates over all thread groups in this group (and its sub-groups) and and stores the groups in the given array.
Enumerate(Thread[], Boolean) : Int32
Iterates over all active threads in this group (and, optionally, its sub-groups) and stores the threads in the given array.
Enumerate(ThreadGroup[], Boolean) : Int32
Iterates over all thread groups in this group (and, optionally, its sub-groups) and stores the groups in the given array.
Interrupt()
Interrupts every Thread in this group and recursively in all its subgroups.
List()
Outputs to System.out a text representation of the hierarchy of Threads and ThreadGroups in this thread group (and recursively).
ParentOf(ThreadGroup) : Boolean
Checks whether this thread group is a direct or indirect parent group of a given ThreadGroup.
Resume()
Resumes every thread in this group and recursively in all its subgroups.
Stop()
Stops every thread in this group and recursively in all its subgroups.
Suspend()
Suspends every thread in this group and recursively in all its subgroups.
UncaughtException(Thread, Throwable)
Handles uncaught exceptions.