ASP.NET has it's own pool of worker threads for processing HTTP
requests, it does not use the same ThreadPool for those requests. I
believe this pool is much larger than the standard ThreadPool.
ThreadPool is used by many framework classes though, including most
(but not all) calls to BeginXXX methods (WinForms has it's own async
mechanism as does socket IO).
Also note that when the ThreadPool does get exhauseted, queued items
still run they just have to wait until a thread pool thread becomes
available. For that reason it's advised never to run long-running
tasks on a thread-pool thread, use a custom thread for that.
HTH,
Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
On Wed, 17 Oct 2007 03:23:25 -0700,
Ul**************@gmail.com wrote:
>Hi,
I'm using asp.net 2.0 and I have an understanding issue here!
I don't quite understand when the available threads in the ThreadPool
are ever used. The application I have running doesn't use
ThreadPool.QueueWorkItem, and doesn't create any other Threads. So say
I have 100 users access my application at the exact same time and they
all call on an aspx that takes a couple of seconds to process. I
gather 100 sessions are active, but does that mean 100 threads from
the TreadPool will be required?
My question basically is when/why are threads from the ThreadPool
allocated when ThreadPool.QueueWorkItem is not used.
Thanks to anyone who has time to clear this up for me :o)
Jonathan