title: Reentrancy in async/await?
body: <p>I have a button which has an <code>async</code> handler which calls awaits on an async method. Here's how it looks like: </p>
  
  <pre><code>private async void Button1_OnClick(object sender, RoutedEventArgs e)
  {
      await IpChangedReactor.UpdateIps();
  }
  </code></pre>
  
  <p>Here's how <code>IpChangedReactor.UpdateIps()</code> looks:</p>
  
  <pre><code>public async Task UpdateIps()
  {
      await UpdateCurrentIp();
      await UpdateUserIps();
  }
  </code></pre>
  
  <p>It's async all the way down.<br>
  Now I have a <code>DispatcherTimer</code> which repeatedly calls <code>await IpChangedReactor.UpdateIps</code> in its tick event.  </p>
  
  <p>Let's say I clicked the button. Now the event handler awaits on <code>UpdateIps</code> and returns to caller, this means that WPF will continue doing other things. In the meantime, if the timer fired, it would again call <code>UpdateIps</code> and now both methods will run simultaneously. So the way I see it is that it's similar to using 2 threads. Can race conditions happen? (A part of me says no, because it's all running in the same thread. But it's confusing)</p>
  
  <p>I know that async methods doesn't necessarily run on separate threads. However, on this case, it's pretty confusing.   </p>
  
  <p>If I used synchronous methods here, it would have worked as expected. The timer tick event will run only after the first call completed.</p>
  
  <p>Can someone enlighten me?</p>