title: What state is in the thread that the SynchronizationContext chooses that is not in the IAsyncStateMachine?
body: <p>When an <code>await</code> happens in an <code>async</code> method, an <code>IAsyncStateMachine</code> preserves "locals" and other necessary state. As far as I can tell, this includes method variables and static/instance variables that the method is using.</p>
  
  <p>When the <code>await</code> happens, it also captures a <code>SynchronizationContext</code>, which determines when, where (on what thread), and in what order the method's re-entry (continuation) occurs. The thread that this context chooses for re-entry will include additional state that the continuation might use.</p>
  
  <p>So not all of the "necessary state" goes into the state machine; some of it is in the thread that the <code>SynchronizationContext</code> chooses for the continuation. </p>
  
  <p>Questions: </p>
  
  <ol>
  <li>What state does the thread contain that the state machine does not? </li>
  <li>What are the characteristics of state that goes into the thread versus state that goes into the state machine? </li>
  </ol>
  
  <p><a href="https://blogs.msdn.microsoft.com/pfxteam/2012/04/12/asyncawait-faq/" rel="nofollow noreferrer">https://blogs.msdn.microsoft.com/pfxteam/2012/04/12/asyncawait-faq/</a></p>