ThreadPool.SetMinThreads () can set PortThreads completion number to 0?

I want to set the minimum number of threads. I set the number of work requests that I need, but about the completion of PortThreads, what should be the size (according to dafault, it is equal to the number of processors). can i set it to 0 or is it dangerous? when will it be used?

+2


source to share


1 answer


You can set the minimum number of threads to 0 if you like. This means that the OS will have to start new threads when they are needed and stop them again when they are not, and can lead to a reduction in the number of tasks running concurrently, with both of them having an impact on performance.



You cannot set the maximum number to less than the number of processors.

+1


source







All Articles