Namespace: System.Threading

The System.Threading namespace provides classes and interfaces that enable multithreaded programming. This namespace includes a ThreadPool class that manages groups of threads, a Timer class that enables a delegate to be called after a specified amount of time, and a Mutex class for synchronizing mutually exclusive threads. System.Threading also provides classes for thread scheduling, wait notification, and deadlock resolution.

Members of System.Threading Namespace

Classes
Class Description
class AutoResetEvent Notifies one or more waiting threads that an event has occurred. This class cannot be inherited. 
class Interlocked Provides atomic operations for variables that are shared by multiple threads. 
class ManualResetEvent Occurs when notifying one or more waiting threads that an event has occurred. This class cannot be inherited. 
class Monitor Provides a mechanism that synchronizes access to objects. 
class Mutex A synchronization primitive than can also be used for interprocess synchronization. 
class Overlapped This type supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Used to pack and unpack the managed overlapped class to and from the native overlapped class. 
class ReaderWriterLock Defines the lock that implements single-writer and multiple-reader semantics. 
class RegisteredWaitHandle Represents a handle that has been registered when calling ThreadPool.RegisterWaitForSingleObject. This class cannot be inherited. 
class SynchronizationLockException The exception that is thrown when a synchronized method is invoked from an unsynchronized block of code. 
class Thread Creates and controls a thread, sets its priority, and gets its status. 
class ThreadAbortException The exception that is thrown when a call is made to the Thread.Abort method. This class cannot be inherited. 
class ThreadInterruptedException The exception that is thrown when a Thread is interrupted while it is in a waiting state. 
class ThreadPool Provides a pool of threads that can be used to post work items, process asynchronous I/O, wait on behalf of other threads, and process timers. 
class ThreadStateException The exception that is thrown when a Thread is in an invalid Thread.ThreadState for the method call. 
class Timeout Contains a constant used to specify an infinite amount of time. This class cannot be inherited. 
class Timer Provides a mechanism for executing methods at specified intervals. This class cannot be inherited. 
class WaitHandle Encapsulates operating system-specific objects that wait for exclusive access to shared resources. 

Structures
Structure Description
structure LockCookie Defines the lock that implements single-writer/multiple-reader semantics. This is a value type. 
structure NativeOverlapped Provides an explicit layout that is visible from unmanaged code and that will have the same layout as the Win32 OVERLAPPED structure with additional reserved fields at the end. 

Delegates
Delegate Description
delegate ThreadStart Represents the method that will handle the event of the Thread class. 
delegate TimerCallback Represents the method that will handle the state of a Timer
delegate WaitCallback Defines the callback method for thread pool user work items. That method must match this delegate. 
delegate WaitOrTimerCallback Receives a parameter that determines whether the handle was signaled or the timed out. 

Enumerations
Enumeration Description
enumeration ThreadPriority Specifies the scheduling priority of a Thread
enumeration ThreadState Specifies the execution states of a Thread

Namepace hierarchy

Copyright (c) 2002 Microsoft Corporation. All rights reserved.