Managed threading

Whether you're developing for computers with one processor or several, you want your application to provide the most responsive interaction with the user, even if the application is currently doing other work. Using multiple threads of execution is one of the most powerful ways to keep your application responsive to the user and at the same time make use of the processor in between or even during user events. While this section introduces the basic concepts of threading, it focuses on managed threading concepts and using managed threading.


Starting with .NET Framework 4, multithreaded programming is greatly simplified with the System.Threading.Tasks.Parallel and System.Threading.Tasks.Task classes, Parallel LINQ (PLINQ), concurrent collection classes in the System.Collections.Concurrent namespace, and a programming model that is based on the concept of tasks rather than threads. For more information, see Parallel Programming.

In This Section

Managed Threading Basics
Provides an overview of managed threading and discusses when to use multiple threads.

Using Threads and Threading
Explains how to create, start, pause, resume, and abort threads.

Managed Threading Best Practices
Discusses levels of synchronization, how to avoid deadlocks and race conditions, and other threading issues.

Threading Objects and Features
Describes the managed classes you can use to synchronize the activities of threads and the data of objects accessed on different threads, and provides an overview of thread pool threads.


Contains classes for using and synchronizing managed threads.

Contains collection classes that are safe for use with multiple threads.

Contains classes for creating and scheduling concurrent processing tasks.

Application Domains
Provides an overview of application domains and their use by the Common Language Infrastructure.

Asynchronous File I/O
Describes the performance advantages and basic operation of asynchronous I/O.

Task-based Asynchronous Pattern (TAP)
Provides an overview of the recommended pattern for asynchronous programming in .NET.

Calling Synchronous Methods Asynchronously
Explains how to call methods on thread pool threads using built-in features of delegates.

Parallel Programming
Describes the parallel programming libraries, which simplify the use of multiple threads in applications.

Parallel LINQ (PLINQ)
Describes a system for running queries in parallel, to take advantage of multiple processors.