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.
Namespace hierarchy Classes
Class Description AutoResetEvent Notifies a waiting thread that an event has occurred. This class cannot be inherited. Interlocked Provides atomic operations for variables that are shared by multiple threads. ManualResetEvent Notifies one or more waiting threads that an event has occurred. This class cannot be inherited. Monitor Provides a mechanism that synchronizes access to objects. Mutex A synchronization primitive than can also be used for interprocess synchronization. ReaderWriterLock Defines a lock that supports single writers and multiple readers. RegisteredWaitHandle Represents a handle that has been registered when calling RegisterWaitForSingleObject. This class cannot be inherited. SynchronizationLockException 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. Thread Creates and controls a thread, sets its priority, and gets its status. ThreadAbortException The exception that is thrown when a call is made to the Abort method. This class cannot be inherited. ThreadExceptionEventArgs Provides data for the ThreadException event. ThreadInterruptedException The exception that is thrown when a Thread is interrupted while it is in a waiting state. 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. ThreadStateException The exception that is thrown when a Thread is in an invalid ThreadState for the method call. Timeout Contains a constant used to specify an infinite amount of time. This class cannot be inherited. Timer Provides a mechanism for executing a method at specified intervals. This class cannot be inherited. WaitHandle Encapsulates operating system-specific objects that wait for exclusive access to shared resources. Structures
Structure Description LockCookie Defines the lock that implements single-writer/multiple-reader semantics. This is a value type. 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 Enumerations See Also
.NET Framework Class Library
Did you find this helpful?
( 1500 characters remaining)
Thank you for your feedback