title: Handling multiple synchronous network calls within asynchronous methods?
body: <p>In the below example, I have a method that is called asynchronously with a flag.</p>
  
  <p>Within the method, it will make two separate network calls asynchronously and await them after both have been called and the result is needed. Once it has the result of both, it will call a method which processes the results of the two network calls one at a time. Each item requires a network call which, for the purposes of this question, can't be made asynchronous and must be awaited immediately.</p>
  
  <pre><code>private HttpClient client = new HttpClient();
  
  static async Task Main()
  {
      var task1 = FooAsync(true);
      var task2 = FooAsync(false);
  
      Task.WaitAll(Task1, Task2);
  
      // Do some stuff with the results
  }
  
  private async Task&lt;List&lt;int&gt;&gt; FooAsync(bool input)
  {
      HttpResponseMessage response1 = client.GetAsync("https://baseUrlX/" + input.ToString());
      HttpResponseMessage response2 = client.GetAsync("https://baseUrlY/" + input.ToString());
  
      string content1 = await response1.Content.ReadAsStringAsync();
      string content2 = await response2.Content.ReadAsStringAsync();
  
      return ProcessItems(content1, content2);
  }
  
  private async Task&lt;List&lt;int&gt;&gt; ProcessItemsAsync(string content1, string content2)
  {
      List&lt;int&gt; results = new List&lt;int&gt;();
      string content = content1 + content2;
      foreach(char c in content)
      {
          var response = client.GetAsync("https://someUrl/" + c);
          string content = await response.Content.ReadAsStringAsync(); // Blocking call here
          results.Add(Int.Parse(content));
      }
  
      return results;
  }
  </code></pre>
  
  <p>My question is whether the two asynchronously calls in <code>Main()</code> accomplishes anything or if they would be processed synchronously. Are there two independent threads fired from there that fire off two more independent threads inside <code>FooAsync</code> before processing each item in <code>ProcessItems</code> using the two original threads?</p>