System.Threading namespaces
The System.Threading, System.Threading.Tasks, and System.Threading.Tasks.DataFlow namespaces contain types that enable multithreaded programming and that simplify writing concurrent and asynchronous code.
This topic displays the types in the System.Threading, System.Threading.Tasks, and System.Threading.Tasks.DataFlow namespaces that are included in the .NET for Windows Store apps, or can be installed and used to create Windows Store apps. Note that the .NET for Windows Store apps does not include all the members of each type. For information about individual types, see the linked topics. The documentation for a type indicates which members are included in the .NET for Windows Store apps.
To install the System.Threading.Tasks.Dataflow namespace, open your project in Visual Studio 2012 or later, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Tpl.Dataflow package.
System.Threading namespace
Types supported in the .NET for Windows Store apps |
Description |
---|---|
The exception that is thrown when one thread acquires a Mutex object that another thread has abandoned by exiting without releasing it. |
|
Notifies a waiting thread that an event has occurred. This class cannot be inherited. |
|
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases. |
|
The exception that is thrown when the post-phase action of a Barrier fails. |
|
Propagates notification that operations should be canceled. |
|
Represents a callback delegate that has been registered with a CancellationToken. |
|
Signals to a CancellationToken that it should be canceled. |
|
Represents a synchronization primitive that is signaled when its count reaches zero. |
|
Indicates whether an EventWaitHandle is reset automatically or manually after receiving a signal. |
|
Represents a thread synchronization event. |
|
Provides atomic operations for variables that are shared by multiple threads. |
|
Provides lazy initialization routines. |
|
Specifies how a Lazy<T> instance synchronizes access among multiple threads. |
|
The exception that is thrown when recursive entry into a lock is not compatible with the recursion policy for the lock. |
|
Specifies whether a lock can be entered multiple times by the same thread. |
|
Notifies one or more waiting threads that an event has occurred. This class cannot be inherited. |
|
Provides a slimmed down version of ManualResetEvent. |
|
Provides a mechanism that synchronizes access to objects. |
|
A synchronization primitive that can also be used for interprocess synchronization. |
|
Represents a lock that is used to manage access to a resource, allowing multiple threads for reading or exclusive access for writing. |
|
Limits the number of threads that can access a resource or pool of resources concurrently. |
|
The exception that is thrown when the Release method is called on a semaphore whose count is already at the maximum. |
|
A lightweight alternative to Semaphore that limits the number of threads that can access a resource or pool of resources concurrently. |
|
Represents a method to be called when a message is to be dispatched to a synchronization context. |
|
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. |
|
Provides support for spin-based waiting. |
|
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. |
|
Provides thread-local storage of data. |
|
Contains constants that specify infinite time-out intervals. This class cannot be inherited. |
|
Contains methods for performing volatile memory operations. |
|
Encapsulates operating system-specific objects that wait for exclusive access to shared resources. |
|
The exception that is thrown when an attempt is made to open a system mutex or semaphore that does not exist. |
System.Threading.Tasks namespace
Types supported in the .NET for Windows Store apps |
Description |
---|---|
Provides concurrent and exclusive task schedulers that coordinate to execute tasks while ensuring that concurrent tasks may run concurrently and exclusive tasks never do. |
|
Provides support for parallel loops and regions. |
|
Provides completion status on the execution of a parallel loop. |
|
Enables iterations of Parallel loops to interact with other iterations. An instance of this class is provided by the Parallel class to each loop; you cannot create instances in your user code. |
|
Stores options that configure the operation of methods on the Parallel class. |
|
Represents an asynchronous operation. |
|
Represents an asynchronous operation that can return a value. |
|
Represents an exception used to communicate task cancellation. |
|
Represents the producer side of a Task<TResult> unbound to a delegate, providing access to the consumer side through the TaskCompletionSource<T>.Task property. |
|
Specifies the behavior for a task that is created by using the ContinueWith or Task<T>.ContinueWith method. |
|
Specifies flags that control optional behavior for the creation and execution of tasks. |
|
Provides a set of static (Shared in Visual Basic) methods for working with specific kinds of Task instances. |
|
Provides support for creating and scheduling Task objects. |
|
Provides support for creating and scheduling Task<T> objects. |
|
Represents an object that handles the low-level work of queuing tasks onto threads. |
|
Represents an exception used to communicate an invalid operation by a TaskScheduler. |
|
Represents the current stage in the lifecycle of a task. |
|
Provides data for the event that is raised when a faulted task's exception goes unobserved. |
System.Threading.Tasks.DataFlow namespace
To install the System.Threading.Tasks.Dataflow namespace, open your project in Visual Studio 2012, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Tpl.Dataflow package.
Types supported in the .NET for Windows Store apps |
Description |
---|---|
Provides a dataflow block that invokes a provided Action<T> delegate for every data element received. |
|
Provides a dataflow block that batches inputs into arrays. |
|
Provides a dataflow block that batches a specified number of inputs of potentially differing types provided to one or more of its targets. |
|
Provides a dataflow block that batches a specified number of inputs of potentially differing types provided to one or more of its targets. |
|
Provides a buffer for storing at most one element at a time, overwriting each message with the next as it arrives. Messages are broadcast to all linked targets, all of which may consume a clone of the message. |
|
Provides a buffer for storing data. |
|
Provides a set of static (Shared in Visual Basic) methods for working with dataflow blocks. |
|
Provides options used to configure the processing performed by dataflow blocks. |
|
Provides options used to configure a link between dataflow blocks. |
|
Provides a container of data attributes for passing between dataflow blocks. |
|
Represents the status of a DataflowMessageHeader when passed between dataflow blocks. |
|
Provides options used to configure the processing performed by dataflow blocks that process each message through the invocation of a user-provided delegate. These are dataflow blocks such as ActionBlock<TInput> and TransformBlock<TInput, TOutput>. |
|
Provides options used to configure the processing performed by dataflow blocks that group together multiple messages. These are dataflow blocks such as JoinBlock<T1, T2> and BatchBlock<T>. |
|
Represents a dataflow block. |
|
Represents a dataflow block that is both a target for data and a source of data. |
|
Represents a dataflow block that supports receiving messages without linking. |
|
Represents a dataflow block that is a source of data. |
|
Represents a dataflow block that is a target for data. |
|
Provides a dataflow block that joins across multiple dataflow sources, which are not necessarily of the same type, waiting for one item to arrive for each type before they’re all released together as a tuple that contains one item per type. |
|
Provides a dataflow block that joins across multiple dataflow sources, which are not necessarily of the same type, waiting for one item to arrive for each type before they’re all released together as a tuple that contains one item per type. |
|
Provides a dataflow block that invokes a provided Func<T, TResult> delegate for every data element received. |
|
Provides a dataflow block that invokes a provided Func<T, TResult> delegate for every data element received. |
|
Provides a buffer for receiving and storing at most one element in a network of dataflow blocks. |