The .NET Framework provides a number of objects that help you create and manage multithreaded applications. Managed threads are represented by the Thread class. The ThreadPool class provides easy creation and management of multithreaded background tasks. The BackgroundWorker class does the same for tasks that interact with the user interface. The Timer class executes background tasks at timed intervals.
In addition, there are a number of classes that synchronize activities of threads, including the Semaphore and EventWaitHandle classes introduced in the .NET Framework version 2.0. The features of these classes are compared in Overview of Synchronization Primitives.
In This Section
The Managed Thread Pool
Explains the ThreadPool class, which enables you to request a thread to execute a task without having to do any thread management yourself.
Explains how to use a Timer to specify a delegate to be called at a specified time.
Explains how to use the Monitor class to synchronize access to a member or to build your own thread management types.
EventWaitHandle, AutoResetEvent, CountdownEvent, ManualResetEvent
Describes managed event wait handles, which are used to synchronize thread activities by signaling and waiting for signals.
Defines a lock that implements single-writer/multiple-reader semantics.
Overview of Synchronization Primitives
Compares the features of the .NET Framework classes provided for locking and synchronizing managed threads.
Provides reference documentation for the Thread class, which represents a managed thread, whether it came from unmanaged code or was created in a managed application.
Enables background tasks that interact with the user interface, communicating via events raised on the user-interface thread.
Asynchronous File I/O
Describes how I/O asynchronous completion ports use the thread pool to require processing only when an input/output operation completes.
Task Parallel Library (TPL)
Describes the recommended approach for multithreaded programming in the .NET Framework 4 and later.