Share via


Thread Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates and controls a thread, sets its priority, and gets its status.

Inheritance Hierarchy

System. . :: . .Object
  System.Threading..::..Thread

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public NotInheritable Class Thread
public sealed class Thread
public ref class Thread sealed
[<Sealed>]
type Thread =  class end
public final class Thread

The Thread type exposes the following members.

Constructors

  Name Description
Public method Thread Initializes a new instance of the Thread class.

Top

Properties

  Name Description
Public propertyStatic member CurrentThread Gets the currently running thread.
Public property IsAlive Gets a value indicating the execution status of the current thread.
Public property ManagedThreadId Gets a unique identifier for the current managed thread.
Public property Priority Gets or sets a value indicating the scheduling priority of a thread.
Public property ThreadState Gets a value containing the states of the current thread.

Top

Methods

  Name Description
Public method Abort Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic member GetDomain Returns the current ___domain in which the current thread is running.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Join() () () () Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping.
Public method Join(Int32) Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
Public method Join(TimeSpan) Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
Public method Resume Resumes a thread that has been suspended.
Public methodStatic member Sleep Suspends the current thread for a specified time.
Public method Start Causes the operating system to change the state of the current instance to ThreadState..::..Running.
Public method Suspend Either suspends the thread, or if the thread is already suspended, has no effect.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Threading Namespace