Collection to hold maximum number of running Tasks
What you have described here is a Producer- Consumer relationship. .Net has a BlockingCollection that performs exactly what you are trying to create here

public BlockingCollection(
    IProducerConsumerCollection&lt;T&gt; collection,
    int boundedCapacity
)



  You could use a ConcurrentBag as the underlying store or any ConcurrentCollection of your choice and the boundedCapacitycan be the maximum number of Tasks that can be added to the collection. An example usage is


BlockingCollection&lt;int&gt; messages = new BlockingCollection&lt;int&gt;(new ConcurrentBag&lt;int&gt;(), 10);