1 out of 1 rated this helpful - Rate this topic

System.Collections.Concurrent Namespace

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The System.Collections.Concurrent namespace provides several thread-safe collection classes that should be used in place of the corresponding types in the System.Collections and System.Collections.Generic namespaces whenever multiple threads are accessing the collection concurrently.

  Class Description
Public class BlockingCollection<T> Provides blocking and bounding capabilities for thread-safe collections that implement IProducerConsumerCollection<T>.
Public class ConcurrentBag<T> Represents a thread-safe, unordered collection of objects.
Public class ConcurrentDictionary<TKey, TValue> Represents a thread-safe collection of key-value pairs that can be accessed by multiple threads concurrently.
Public class ConcurrentQueue<T> Represents a thread-safe first in-first out (FIFO) collection.
Public class ConcurrentStack<T> Represents a thread-safe last in-first out (LIFO) collection.
Public class OrderablePartitioner<TSource> Represents a particular manner of splitting an orderable data source into multiple partitions.
Public class Partitioner Provides common partitioning strategies for arrays, lists, and enumerables.
Public class Partitioner<TSource> Represents a particular manner of splitting a data source into multiple partitions.
  Interface Description
Public interface IProducerConsumerCollection<T> Defines methods to manipulate thread-safe collections intended for producer/consumer usage. This interface provides a unified representation for producer/consumer collections so that higher level abstractions such as System.Collections.Concurrent.BlockingCollection<T> can use the collection as the underlying storage mechanism.
  Enumeration Description
Public enumeration EnumerablePartitionerOptions Out-of-the-box partitioners are created with a set of default behaviors. For example, by default, some form of buffering and chunking will be employed to achieve optimal performance in the common scenario where an IEnumerable<T> implementation is fast and non-blocking. These behaviors can be overridden using this enumeration.
Did you find this helpful?
(1500 characters remaining)