Udostępnij za pośrednictwem


ThreadGroup Class

Definition

A thread group represents a set of threads.

[Android.Runtime.Register("java/lang/ThreadGroup", DoNotGenerateAcw=true)]
public class ThreadGroup : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.Thread.IUncaughtExceptionHandler
[<Android.Runtime.Register("java/lang/ThreadGroup", DoNotGenerateAcw=true)>]
type ThreadGroup = class
    inherit Object
    interface Thread.IUncaughtExceptionHandler
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
ThreadGroup
Attributes
Implements

Remarks

A thread group represents a set of threads. In addition, a thread group can also include other thread groups. The thread groups form a tree in which every thread group except the initial thread group has a parent.

A thread is allowed to access information about its own thread group, but not to access information about its thread group's parent thread group or any other thread groups.

Added in 1.0.

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

Constructors

ThreadGroup(IntPtr, JniHandleOwnership)

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

ThreadGroup(String)

Constructs a new thread group.

ThreadGroup(ThreadGroup, String)

Creates a new thread group.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Daemon

Tests if this thread group is a daemon thread group. -or- Changes the daemon status of this thread group.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsDestroyed

Tests if this thread group has been destroyed.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
MaxPriority

Returns the maximum priority of this thread group. -or- Sets the maximum priority of the group.

Name

Returns the name of this thread group.

Parent

Returns the parent of this thread group.

PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

ActiveCount()

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

ActiveGroupCount()

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

AllowThreadSuspension(Boolean)
Obsolete.

Used by VM to control lowmem implicit suspension.

CheckAccess()

Determines if the currently running thread has permission to modify this thread group.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Destroy()

Destroys this thread group and all of its subgroups.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Enumerate(Thread[], Boolean)

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

Enumerate(Thread[])

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

Enumerate(ThreadGroup[], Boolean)

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

Enumerate(ThreadGroup[])

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

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
Interrupt()

Interrupts all threads in this thread group.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
List()

Prints information about this thread group to the standard output.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
ParentOf(ThreadGroup)

Tests if this thread group is either the thread group argument or one of its ancestor thread groups.

Resume()
Obsolete.

Resumes all threads in this thread group.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Stop()
Obsolete.

Stops all threads in this thread group.

Suspend()
Obsolete.

Suspends all threads in this thread group.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UncaughtException(Thread, Throwable)

Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception, and the thread does not have a specific Thread.UncaughtExceptionHandler installed.

UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to