Removes an item from the System.Collections.Concurrent.BlockingCollection`1.
![]()
The item removed from the collection.
A call to BlockingCollection`1.Take(System.Threading.CancellationToken) may block until an item is available to be removed or the token is canceled.
The order in which an item is removed depends on the type of collection used to create the System.Collections.Concurrent.BlockingCollection`1 instance. When you create a System.Collections.Concurrent.BlockingCollection`1 object, you can specify the type of collection to use. For example, you could specify a ConcurrentConcurrentQueue`1 object for first in, first out (FIFO) behavior, or a System.Collections.Concurrent.ConcurrentStack`1 object for last in, first out (LIFO) behavior. You can use any collection class that implements the System.Collections.Concurrent.IProducerConsumerCollection`1 interface. The default collection type for System.Collections.Concurrent.BlockingCollection`1 is System.Collections.Concurrent.ConcurrentQueue`1.