I think that with .net we are not only developing simple clients
applications, maybe (in my case) i'm developing a very complete server
application that requiere thousands of simultaneous transactions and my
server will be run alone in a four processor machine.
So, I think that this is a microsoft error, and for this reason a Toub (from
microsoft) designed the ManagedThreadPool. With the ManagedThreadPool we can
specify the Pool Size
The problem is that .net asynchronous operations, use the framework
ThreadPool and I can't change that. So, in my case the ManagedThreadPool is
not useful
Well, anyway thanks for your answer
AA
Nicholas Paldino said:
The reason that it is so hard to change the max size is because the
thread pool has been optimized to handle the number of processes in
conjunction with the processes running on the machine.
The idea is that if you have so many threads, you actually start to
shoot yourself in the foot with the time wasted in context switches.
I would recommend using the ThreadPool as is.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
AA said:
Why microsoft make so hard to change the max Pool Size??
I really need to change it to 50, because I'm using delegates with
BeginInvoke and I saw that they (delegates) use the ThreadPool, but I saw
too that is very complicate to change the ThreadPool size and if I want, I
need to use unmanage resources
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=201
If I use unmanage resources my application will not be portable to
others
OS
So, somebody know another way or know something that I don't
Thanks a lot
AA