Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

System.Threading Namespace

 

The System.Threading namespace provides classes and interfaces that enable multithreaded programming. In addition to classes for synchronizing thread activities and access to data (Mutex, Monitor, Interlocked, AutoResetEvent, and so on), this namespace includes a ThreadPool class that allows you to use a pool of system-supplied threads, and a Timer class that executes callback methods on thread pool threads.

ClassDescription
System_CAPS_pubclassAbandonedMutexException

The exception that is thrown when one thread acquires a Mutex object that another thread has abandoned by exiting without releasing it.

System_CAPS_pubclassAsyncLocal<T>

Represents ambient data that is local to a given asynchronous control flow, such as an asynchronous method.

System_CAPS_pubclassAutoResetEvent

Notifies a waiting thread that an event has occurred. This class cannot be inherited.

System_CAPS_pubclassBarrier

Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.

System_CAPS_pubclassBarrierPostPhaseException

The exception that is thrown when the post-phase action of a Barrier fails

System_CAPS_pubclassCancellationTokenSource

Signals to a CancellationToken that it should be canceled.

System_CAPS_pubclassCompressedStack

Provides methods for setting and capturing the compressed stack on the current thread. This class cannot be inherited.

System_CAPS_pubclassCountdownEvent

Represents a synchronization primitive that is signaled when its count reaches zero.

System_CAPS_pubclassEventWaitHandle

Represents a thread synchronization event.

System_CAPS_pubclassExecutionContext

Manages the execution context for the current thread. This class cannot be inherited.

System_CAPS_pubclassHostExecutionContext

Encapsulates and propagates the host execution context across threads.

System_CAPS_pubclassHostExecutionContextManager

Provides the functionality that allows a common language runtime host to participate in the flow, or migration, of the execution context.

System_CAPS_pubclassInterlocked

Provides atomic operations for variables that are shared by multiple threads.

System_CAPS_pubclassLazyInitializer

Provides lazy initialization routines.

System_CAPS_pubclassLockRecursionException

The exception that is thrown when recursive entry into a lock is not compatible with the recursion policy for the lock.

System_CAPS_pubclassManualResetEvent

Notifies one or more waiting threads that an event has occurred. This class cannot be inherited.

System_CAPS_pubclassManualResetEventSlim

Provides a slimmed down version of ManualResetEvent.

System_CAPS_pubclassMonitor

Provides a mechanism that synchronizes access to objects.

System_CAPS_pubclassMutex

A synchronization primitive that can also be used for interprocess synchronization.

System_CAPS_pubclassOverlapped

Provides a managed representation of a Win32 OVERLAPPED structure, including methods to transfer information from an Overlapped instance to a NativeOverlapped structure.

System_CAPS_pubclassReaderWriterLock

Defines a lock that supports single writers and multiple readers.

System_CAPS_pubclassReaderWriterLockSlim

Represents a lock that is used to manage access to a resource, allowing multiple threads for reading or exclusive access for writing.

System_CAPS_pubclassRegisteredWaitHandle

Represents a handle that has been registered when calling RegisterWaitForSingleObject. This class cannot be inherited.

System_CAPS_pubclassSemaphore

Limits the number of threads that can access a resource or pool of resources concurrently.

System_CAPS_pubclassSemaphoreFullException

The exception that is thrown when the Semaphore.Release method is called on a semaphore whose count is already at the maximum.

System_CAPS_pubclassSemaphoreSlim

Represents a lightweight alternative to Semaphore that limits the number of threads that can access a resource or pool of resources concurrently.

System_CAPS_pubclassSynchronizationContext

Provides the basic functionality for propagating a synchronization context in various synchronization models.

System_CAPS_pubclassSynchronizationLockException

The exception that is thrown when a method requires the caller to own the lock on a given Monitor, and the method is invoked by a caller that does not own that lock.

System_CAPS_pubclassThread

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

System_CAPS_pubclassThreadAbortException

The exception that is thrown when a call is made to the Abort method. This class cannot be inherited.

System_CAPS_pubclassThreadExceptionEventArgs

Provides data for the ThreadException event.

System_CAPS_pubclassThreadInterruptedException

The exception that is thrown when a Thread is interrupted while it is in a waiting state.

System_CAPS_pubclassThreadLocal<T>

Provides thread-local storage of data.

System_CAPS_pubclassThreadPool

Provides a pool of threads that can be used to execute tasks, post work items, process asynchronous I/O, wait on behalf of other threads, and process timers.

System_CAPS_pubclassThreadStartException

The exception that is thrown when a failure occurs in a managed thread after the underlying operating system thread has been started, but before the thread is ready to execute user code.

System_CAPS_pubclassThreadStateException

The exception that is thrown when a Thread is in an invalid ThreadState for the method call.

System_CAPS_pubclassTimeout

Contains constants that specify infinite time-out intervals. This class cannot be inherited.

System_CAPS_pubclassTimer

Provides a mechanism for executing a method on a thread pool thread at specified intervals. This class cannot be inherited.

To browse the .NET Framework source code for this type, see the Reference Source.

System_CAPS_pubclassVolatile

Contains methods for performing volatile memory operations.

System_CAPS_pubclassWaitHandle

Encapsulates operating system–specific objects that wait for exclusive access to shared resources.

System_CAPS_pubclassWaitHandleCannotBeOpenedException

The exception that is thrown when an attempt is made to open a system mutex, semaphore, or event wait handle that does not exist.

System_CAPS_pubclassWaitHandleExtensions

Provides convenience methods to for working with a safe handle for a wait handle.

StructureDescription
System_CAPS_pubstructureAsyncFlowControl

Provides the functionality to restore the migration, or flow, of the execution context between threads.

System_CAPS_pubstructureAsyncLocalValueChangedArgs<T>

The class that provides data change information to AsyncLocal<T> instances that register for change notifications.

System_CAPS_pubstructureCancellationToken

Propagates notification that operations should be canceled.

System_CAPS_pubstructureCancellationTokenRegistration

Represents a callback delegate that has been registered with a CancellationToken.

System_CAPS_pubstructureLockCookie

Defines the lock that implements single-writer/multiple-reader semantics. This is a value type.

System_CAPS_pubstructureNativeOverlapped

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.

System_CAPS_pubstructureSpinLock

Provides a mutual exclusion lock primitive where a thread trying to acquire the lock waits in a loop repeatedly checking until the lock becomes available.

System_CAPS_pubstructureSpinWait

Provides support for spin-based waiting.

DelegateDescription
System_CAPS_pubdelegateContextCallback

Represents a method to be called within a new context.

System_CAPS_pubdelegateIOCompletionCallback

Receives the error code, number of bytes, and overlapped value type when an I/O operation completes on the thread pool.

System_CAPS_pubdelegateParameterizedThreadStart

Represents the method that executes on a Thread.

System_CAPS_pubdelegateSendOrPostCallback

Represents a method to be called when a message is to be dispatched to a synchronization context.

System_CAPS_pubdelegateThreadExceptionEventHandler

Represents the method that will handle the ThreadException event of an Application.

System_CAPS_pubdelegateThreadStart

Represents the method that executes on a Thread.

System_CAPS_pubdelegateTimerCallback

Represents the method that handles calls from a Timer.

System_CAPS_pubdelegateWaitCallback

Represents a callback method to be executed by a thread pool thread.

System_CAPS_pubdelegateWaitOrTimerCallback

Represents a method to be called when a WaitHandle is signaled or times out.

EnumerationDescription
System_CAPS_pubenumApartmentState

Specifies the apartment state of a Thread.

System_CAPS_pubenumEventResetMode

Indicates whether an EventWaitHandle is reset automatically or manually after receiving a signal.

System_CAPS_pubenumLazyThreadSafetyMode

Specifies how a System.Lazy<T> instance synchronizes access among multiple threads.

System_CAPS_pubenumLockRecursionPolicy

Specifies whether a lock can be entered multiple times by the same thread.

System_CAPS_pubenumThreadPriority

Specifies the scheduling priority of a Thread.

System_CAPS_pubenumThreadState

Specifies the execution states of a Thread.

Return to top
Show:
© 2016 Microsoft