Andras Csehi Andras Csehi - 1 year ago 147
C# Question

Maximum queued elements in ThreadPool.QueueUserWorkItem

I set the max thread to 10. Then I added 22000 task using ThreadPool.QueueUserWorkItem.
It is very likely that not all the 22000 task was completed after running the program. Is there a limitation how many task can be queued for avaiable threads?

Answer Source

The queue has no practical limit however the pool itself will not exceed 64 wait handles, ie total threads active.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download