how to control max. # of threads used in a thread pool

G

Guoqi Zheng

Dear sir,

Threadpool will open up to 25 threads which is a little too much for our
remote server. How can I reduce the nr. of threads it will use?
 
G

Guoqi Zheng

I found this on msdn
The thread pool is created the first time you create an instance of the ThreadPool class. The thread pool has a default limit of 25 threads per available processor, which could be changed using CorSetMaxThreads as defined in the mscoree.h file. Each thread uses the default stack size and runs at the default priority. Each process can have only one operating system thread pool.

but there is not further information about how to use it. Any one can help????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top