title: async await usages for CPU computing vs IO operation?
body: <p><em>I already know that <code>async-await</code> keeps the thread context , also handle exception forwarding etc.(which helps a lot).</em></p>
  
  <p>But consider the following example : </p>
  
  <pre><code>/*1*/   public async Task&lt;int&gt; ExampleMethodAsync()
  /*2*/   {
  /*3*/       var httpClient = new HttpClient(); 
  /*4*/      
  /*5*/       //start async task...
  /*6*/       Task&lt;string&gt; contentsTask = httpClient.GetStringAsync("http://msdn.microsoft.com");
  /*7*/   
  /*8*/       //wait and return...  
  /*9*/       string contents = await contentsTask;
  /*10*/   
  /*11*/       //get the length...
  /*12*/       int exampleInt = contents.Length;
  /*13*/       
  /*14*/       //return the length... 
  /*15*/       return exampleInt;
  /*16*/   }
  </code></pre>
  
  <p>If the <code>async</code> method (<code>httpClient.GetStringAsync</code>) is an IO operation ( like in my sample  above) So -  I gain these things : </p>
  
  <ul>
  <li><strong>Caller</strong> Thread is not blocked   </li>
  <li><strike><strong>Worker</strong> thread is released because there is an <em>IO</em> operation ( IO completion ports...)</strike> (GetStringAsync uses <code>TaskCompletionSource</code> and not open a new thread)</li>
  <li>Preserved thread context</li>
  <li>Exception is thrown back</li>
  </ul>
  
  <p>But What if instead of <code>httpClient.GetStringAsync</code> (IO operation) , I have a <strong>Task</strong> of <code>CalcFirstMillionsDigitsOf_PI_Async</code> (heavy compute bound operation on a sperate thread)</p>
  
  <p>It seems that the only things I gain here is :</p>
  
  <ul>
  <li>Preserved thread context</li>
  <li>Exception is thrown back</li>
  <li><strong>Caller</strong> Thread is not blocked </li>
  </ul>
  
  <p>But I still have another thread ( parallel thread) which executes the operation. and the cpu is switching between the main thread  and  the operation .</p>
  
  <p>Does my diagnostics is correct?</p>