C# ThreadPool application performance degrading over time C# ThreadPool application performance degrading over time multithreading multithreading

C# ThreadPool application performance degrading over time


If number of available threads in the ThreadPool becomes 0, and you continue to add new work items then newly added work items will "wait". This means that your ComputeParent will wait for its instances of "myComputationCall". Starting more and more ComputeParent will cause that average execution time of them will go up.


This question has been answered. Thanks to all of the posters.

For others with a similar issue, I would suggest the Task Parallel Library as suggested by Henk.