ThreadPool not starting new Thread instantly

The ThreadPool is specifically not intended for long-running items (more specifically, you aren't even necessarily starting up new threads when you use the ThreadPool, as its purpose is to spread the tasks over a limited number of threads).

If your task is long running, you should either break it up into logical sections that are put on the ThreadPool (or use the new Task framework), or spin up your own Thread object.

As to why you're experiencing the delay, the MSDN Documentation for the ThreadPool class says the following:

As part of its thread management strategy, the thread pool delays before creating threads. Therefore, when a number of tasks are queued in a short period of time, there can be a significant delay before all the tasks are started.

You only know that the ThreadPool hasn't reached its maximum thread count, not how many threads (if any) it actually has sitting idle.


The thread pool's maximum number of threads value is the maximum number that it can create. It is not the maximum number that are already created. The thread pool has logic that prevents it from spinning up a whole bunch of threads instantly.

If you call ThreadPool.QueueUserWorkItem 10 times in quick succession, the thread pool will not create 10 threads immediately. It will start a thread, delay, start another, etc.

I seem to recall that the delay was 500 milliseconds, but I can't find the documentation to verify that.

Here it is: The Managed Thread Pool:

The thread pool has a built-in delay (half a second in the .NET Framework version 2.0) before starting new idle threads. If your application periodically starts many tasks in a short time, a small increase in the number of idle threads can produce a significant increase in throughput. Setting the number of idle threads too high consumes system resources needlessly.

You can control the number of idle threads maintained by the thread pool by using the GetMinThreads and SetMinThreads

Note that this quote is taken from the .NET 3.5 version of the documentation. The .NET 4.0 version does not mention a delay.