ThreadPool.SetMaxThreads returns false

My understanding of SetMaxThreads () in C # was that it cannot be set to less than the number of processors.

But in my code, I cannot set the number less than 8, I have no idea why this is.

If I set it to shrink, it returns false!

(Running Intel Core 2)

0


source to share


1 answer


I think I've solved this problem now (kinda!) If SetMinThreads () is set to the minimum number first, so in my case of 2 we can set the maximum number of threads to less than 8.



I know this has to do with simple thread resource links, but for my purposes this is the right job.

+3


source







All Articles