Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There is in fact a difference in threads in ASP .NET: Worker threads and IO threads (system threads which i believe you state as CLR thread).</p> <p>Now ASP .NET use a worker thread on each request, unless custom configurations are used, and these worker threads are limited on your CPU number; this configuration can be set in IIS. When you start an asynchronous task inside ASP.NET by using delegate for instance, you are using another worker thread. Delegates are a quick and dirty way of starting something asynchronous in .NET :)</p> <p>If you want to start a new thread which does NOT use up a worker thread, then you must explicitly start a new thread like: new Thread()....etc. Now this comes with alot code management, and does not follow the event based asynchronous pattern. However there is one way you can start asynchronous threads safely and that is by using .NETs own asynch methods on objects. Things you normally would use asynch for like SQL commands, webservice calls, etc. All these have a BEGIN and an END method. By using these methods you will never use a worker thread, but an IO thread.</p> <p>ASP .NET has a few tricks up its sleeve when it comes to asynchronous pages. There are two alternatives: </p> <ol> <li>Asynchronous page: which lets your page cycle to be asyncronous. This basicly means that the page is requested asynchronous. </li> <li>Asynchronous page tasks: which lets you define tasks that will fire asynchronous when the page starts. Its kinda like Asynch threads, just that ASP .NET does alot of things for you, and its more restricted.</li> </ol> <p>I dont have all the details, but please look into the two options on MSDN Library. Here is an article on the subject: <a href="http://nirajrules.wordpress.com/2009/09/28/net-worker-threads-io-threads-and-asynchronous-programming/" rel="nofollow">asynch programmin</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload