title: Using Task or async/await in IHttpAsyncHandler
body: <p>Since the very begining of writing ASP.NET applications when I wanted to add a threading there are 3 simple ways I can accomplish threading within my ASP.NET application :</p>
  
  <ul>
  <li>Using the <code>System.Threading.ThreadPool</code>.   </li>
  <li>Using a custom delegate and calling its <code>BeginInvoke</code> method.  </li>
  <li>Using custom threads with the aid of <code>System.Threading.Thread</code> class.</li>
  </ul>
  
  <p>The first two methods offer a quick way to fire off worker threads for your application. But unfortunately, they hurt the overall performance of your application since they <strong>consume threads from the same pool used by ASP.NET to handle HTTP requests</strong>.</p>
  
  <p>Then I wanted to use a new Task or async/await to write <code>IHttpAsyncHandler</code>. One example you can find is what Drew Marsh explains here : <a href="https://stackoverflow.com/a/6389323/261950">https://stackoverflow.com/a/6389323/261950</a></p>
  
  <p>My guess is that using Task or async/await still consume the thread from the ASP.NET thread pool and I don't want for the obvious reason.</p>
  
  <p>Could you please tell me <strong>if I can use Task (async/await) on the background thread</strong> like with <code>System.Threading.Thread</code> class <strong>and not from thread pool</strong> ?</p>
  
  <p>Thanks in advance for your help.</p>
  
  <p>Thomas</p>