Change Thread pool limit

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

You can only do this in .NET 2.0 and above. You can call the new static
SetMaxThreads method on the ThreadPool class.

You should only tweak this if you really know what you are doing.
Usually, the system does an ok job with it.

Hope this helps.
 
Not possible in .NET 1.x but 2.0.

Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?


Thanks a lot,

objectref
 
Usually requests like thes point to a flawed design or bad code. Mind
outlining the reason for such a request?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
objectref said:
can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?

I would suggest avoiding using the system threadpool altogether - it's
far too easy to deadlock. You could use a custom threadpool though.
There are plenty around, including my own, available from
http://www.pobox.com/~skeet/csharp/miscutil
 
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i can
change the ThreadPool limit
from 25 to something else ?


Thanks a lot,

objectref
 
Xmmm...hardcoded threads made by me, seems to slow a specific portion of my
code down.
The whole system also seems to behave more quickly when using a threadpool.

Never mind, thank a lot all the guys!

objectref

Alvin Bruney - ASP.NET MVP said:
Usually requests like thes point to a flawed design or bad code. Mind
outlining the reason for such a request?

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------



objectref said:
Hi to all,

can anyone tells me (or point to me a direction or a link) about how i
can
change the ThreadPool limit
from 25 to something else ?


Thanks a lot,

objectref
 
Back
Top