Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is technically <code>not a new thread</code> its a Threadpool thread, and it migth last longer than your process/program but might run some other threads asynch calls immediately it finishes yours. Check MSDN articles on <a href="http://msdn.microsoft.com/en-us/library/2e08f6yc(v=VS.71).aspx" rel="noreferrer">Asynch Programming</a> and <a href="http://msdn.microsoft.com/en-us/library/3dasc8as(VS.80).aspx" rel="noreferrer">Threadpool</a> to get the complete details.</p> <p>And depending on your interest check <a href="http://msdn.microsoft.com/en-us/library/aa365198(VS.85).aspx" rel="noreferrer">I/O CompletionPort</a> for additional details. </p> <p>Asynch programming is generally considered better than atleast synchronous code, but f you are on .NET 4.0 take a look at <a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx" rel="noreferrer">Task Parallel Library</a>.</p> <p>Based on Question Edit, when should I create my own thread? It is always better to use BeginInvoke or Async programming compared to creating your own thread. Strictly create your own thread when you are sure that you need a dedicated thread doing some task/work continuously and you are clear about the synchronization mechanics needed by multiple threads in your application. Avoid creating new threads as long as you can unless you have a really compelling reason. You add a thread today and probably move on and after two years three developers see that an additional thread was added for some continuous stuff, they'll add few more and so on. Trust me I've seen this happening, therefore set the right practices (ie using Asynch methods) and people will try to follow that. I've seen applications with 150 threads, does that make sense on a dual core or quad core machine, I dont think so.</p> <p>Just checked all the running processes on my Toshiba Laptop for such badly designed apps, Toshiba Bluetooth Manager wins the crown of worst designed program on my box using 53 threads. :)</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