Is this server written on ASP.NET?
ASP.NET includes a thread pool. If you are not using WS2003, you can
configure the size of it in the machine.config file. If WS2003/IIS6, you
have to use the IIS6 administrative UI to set these things.
If you are not using ASP.NET, then you can separately create and manage your
own thread pool (see the references you got previously).
I'd say that creating a thread just to monitor another thread is probably a
high-overhead design. I don't pretend to understand your design
considerations, but in general you don't need a distinct thread to monitor
each worker thread - where would you ever stop? Instead, you just need a
IAsyncResult . Which is what you get when you use BeginInvoke() on a
System.Delegate.
Check out this overview of asynch programming in .NET.
http://msdn.microsoft.com/library/en-us/cpguide/html/cpovrasynchronousprogrammingoverview.asp -Dino
Microsoft
[quoted text, click to view] "Nitin Patil" <npatil@igentica.com> wrote in message
news:%23bfv7x0hDHA.1692@TK2MSFTNGP10.phx.gbl...
> Hi!
>
> thanks for your reply.
> Let me tell you one thing that the application which i told is already
> running but it was devloped using VC++6
> i want to port the same application on .net but improving some
> performance issues. As the system loads increases the system does
> becomes slower and slower.
>
> My basic intention of using Threadpool was that i dont want to create
> and delete the threads every time but i want to use them as it is. is
> there any way in thread pool to tell that creates max this number of
> threads?
>
> Currently whats happening is when user sends the request the request
> creates say 10 worker threads. And to keep the eye on these thread we
> create 10 monitor thread. So because of it the system does waste its
> time in doing lots of expensive context switching. my aim to use .net
> was to avoid that context switching. is there any better way for that.
> can you give me some suggestions.
>
> thanks
> Nitin
>
>
>
> *** Sent via Developersdex
http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!