Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Limit ThreadPool.SetMaxThreads to a number smaller than the number of processors

$
0
0

Hi,

The documentation of ThreadPool.SetMaxThreads mention: the maximum number of worker threads or I/O completion threads cannot be set to a number smaller than the number of processors on the computer.

Unfortunately doing so, our application will lock the CPU usage at 100% preventing other task to run smoothly.

It is possible to set ProcessorAffinity to specify a subset of processors to use, and therefore SetMaxThreads could be set to a lower number. But this will prevent usage of a processor that may have fewer loads.

Is it possible to achieve the same result by other mean?

Regards,

Huy


Viewing all articles
Browse latest Browse all 1710

Trending Articles