title: Task.WhenAll() - does it create a new thread?
body: <p>According to <a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.whenall%28v=vs.110%29.aspx" rel="noreferrer">MSDN</a>:</p>
  
  <blockquote>
    <p>Creates a task that will complete when all of the supplied tasks have completed.</p>
  </blockquote>
  
  <p>When Task.WhenAll() is called, it creates a task but does that necessarily mean that it creates a new thread to execute that task? For example, how many threads are created in this console application below?</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          RunAsync();
          Console.ReadKey();
      }
  
      public static async Task RunAsync()
      {
  
          Stopwatch sw = new Stopwatch();
          sw.Start();
          Task&lt;string&gt; google = GetString("http://www.google.com");
          Task&lt;string&gt; microsoft = GetString("http://www.microsoft.com");
          Task&lt;string&gt; lifehacker = GetString("http://www.lifehacker.com");
          Task&lt;string&gt; engadget = GetString("http://www.engadget.com");
  
          await Task.WhenAll(google, microsoft, lifehacker, engadget);
          sw.Stop();
          Console.WriteLine("Time elapsed: " + sw.Elapsed.TotalSeconds);
      }
  
      public static async Task&lt;string&gt; GetString(string url)
      {
          using (var client = new HttpClient())
          {
              return await client.GetStringAsync(url);
          }
      }
  }
  </code></pre>