namespace provides classes and interfaces that enable multithreaded programming. In addition to classes for synchronizing thread activities and access to data ( System.Threading , Monitor , Interlocked , and so on), this namespace includes a AutoResetEvent class that enables you to use a pool of system-supplied threads, and a ThreadPool class that executes callback methods on thread pool threads. In addition to the features provided in the Timer namespace, the System.Threading class provides a simple, event-based way to synchronize access to the main application thread. BackgroundWorker
Notifies a waiting thread that an event has occurred. This class cannot be inherited.
Signals to a
that it should be canceled. CancellationToken
Represents a thread synchronization event.
Provides atomic operations for variables that are shared by multiple threads.
Notifies one or more waiting threads that an event has occurred. This class cannot be inherited.
Provides a mechanism that synchronizes access to objects.
A synchronization primitive that can also be used for interprocess synchronization.
Provides a managed representation of a Win32
OVERLAPPED structure, including methods to transfer information from an instance to a Overlapped structure. NativeOverlapped
Represents a handle that has been registered when calling
. This class cannot be inherited. RegisterWaitForSingleObject
Provides the basic functionality for propagating a synchronization context in various synchronization models.
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.
Creates and controls a thread, and gets its status.
The exception that is thrown when a call is made to the
method. This class cannot be inherited. Abort
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.
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.
The exception that is thrown when a
is in an invalid Thread for the method call. ThreadState
Contains a constant that is used to specify an infinite amount of time. This class cannot be inherited.
Provides a mechanism for executing a method at specified intervals. This class cannot be inherited.
Encapsulates operating system–specific objects that wait for exclusive access to shared resources.
Propagates notification that operations should be canceled.
Represents a callback delegate that has been registered with a
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.