Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: ASP.NET Threadpool Question Answered


Message #1 by "Scott Guthrie" <scottgu@m...> on Thu, 22 Mar 2001 10:13:11 -0800
Origional Question:

-----------------------------------------



uma1@v... asks:



The ASP.NET is said to have a thread-pool from which a appliction object



is created, whenever a request for the first page in an assebbly is

revceived. Suppose the first page instantiates a variable in the

Application scope using "Application.Add" and after a few more page

requests, there are no more requests but the object is not set to "Null"



when will the thread die?



This qustion relates to the Chat Application written by me using ASP.NET



Web services which can be seen at

http://aspx.securewebs.com/prasadv/Chatroom.aspx





ScottGu Answer:

------------------------------------------



ASP.NET does indeed have a thread-pool that we use internally to

schedule the processing of incoming requests.  The thread-pool itself is

re-used accross multiple applications (there isn't a separate thread

pool for each application).  So in your example above, where no more

requests are received by an application, any threads being used to

service that application will not die -- but rather simply be used to

process other requests coming into other applications (or if not

requests are being received -- they will simply sleep until one

arrives).



Hope this helps,



Scott



P.S. Cool chat program! :-)


  Return to Index