title: Multiple Awaits in a single method
body: <p>I have a method like this:</p>
  
  <pre><code>public static async Task SaveAllAsync()
  {
      foreach (var kvp in configurationFileMap)
      {
          using (XmlWriter xmlWriter = XmlWriter.Create(kvp.Value, XML_WRITER_SETTINGS))
          {
              FieldInfo[] allPublicFields = 
                             kvp.Key.GetFields(BindingFlags.Public | BindingFlags.Static);
              await xmlWriter.WriteStartDocumentAsync();
              foreach (FieldInfo fi in allPublicFields)
              {
                  await xmlWriter.WriteStartElementAsync("some", "text", "here");
              }
              await xmlWriter.WriteEndDocumentAsync();
          }
      }
  }
  </code></pre>
  
  <p>But I'm struggling to follow what will happen when someone calls <code>SaveAllAsync()</code>. </p>
  
  <p>What I think will happen is this:</p>
  
  <ol>
  <li>When someone first calls it, <code>SaveAllAsync()</code> will return control to the caller at the line <code>await xmlWriter.WriteStartDocumentAsync();</code></li>
  <li>Then... When they await <code>SaveAllAsync()</code> (or wait for the task)... What happens? Will <code>SaveAllAsync()</code> still be stuck on the first await until that is called? Because there's no threading involved, I guess that is the case...</li>
  </ol>