Overview

BlockingCollection<T>

var collection = new BlockingCollection<string>();
var read = Task.Run(() =>
{
    while (true)
        Console.WriteLine(collection.Take());
});
var write = Task.Run(() =>
{
    while (true)
        collection.Add(Console.ReadLine());
});
write.Wait();
read.Wait();
var read = Task.Run(() =>
{
	foreach (var item in collection.GetConsumingEnumerable())
		Console.WriteLine(item);
});

Methods

ConcurrentBag<T>

var bag = new ConcurrentBag<int> { 10, 20 };
Task.Run(() =>
{
	bag.Add(30);
	Thread.Sleep(1000);
	bag.Add(40);
});
Task.Run(() =>
{
	foreach (var number in bag)
		Console.WriteLine(number);
}).Wait();

ConcurrentDictionary<TKey, TValue>