System.Collections.Concurrent Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
However, access to elements of a collection object through extension methods or through explicit interface implementations are not guaranteed to be thread-safe and may need to be synchronized by the caller.
Classes
BlockingCollection<T> |
Provides blocking and bounding capabilities for thread-safe collections that implement IProducerConsumerCollection<T>. |
ConcurrentBag<T> |
Represents a thread-safe, unordered collection of objects. |
ConcurrentDictionary<TKey,TValue> |
Represents a thread-safe collection of key/value pairs that can be accessed by multiple threads concurrently. |
ConcurrentQueue<T> |
Represents a thread-safe first in-first out (FIFO) collection. |
ConcurrentStack<T> |
Represents a thread-safe last in-first out (LIFO) collection. |
OrderablePartitioner<TSource> |
Represents a particular manner of splitting an orderable data source into multiple partitions. |
Partitioner |
Provides common partitioning strategies for arrays, lists, and enumerables. |
Partitioner<TSource> |
Represents a particular manner of splitting a data source into multiple partitions. |
Structs
ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> |
Provides a type that may be used to perform operations on a ConcurrentDictionary<TKey,TValue> using a |
Interfaces
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 BlockingCollection<T> can use the collection as the underlying storage mechanism. |
Enums
EnumerablePartitionerOptions |
Specifies options to control the buffering behavior of a partitioner. |
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: