using System.Collections.Concurrent;
using System.Threading.Tasks;
using System.Diagnostics;
public static void Main()
var queue = new BlockingCollection<int>();
Parallel.ForEach(queue.GetConsumingEnumerable(), _ => { });
{ IsBackground = true }.Start();
Stopwatch stopwatch = Stopwatch.StartNew();
Console.WriteLine($"ThreadCount: {ThreadPool.ThreadCount}");
if (stopwatch.ElapsedMilliseconds > 8000) break;
Console.WriteLine("Finished");