title: In Unity / C#, does .Net's async/await start, literally, another thread?
body: <p><strong>Important</strong> for anyone researching this difficult topic <em>in Unity specifically</em>,</p>
  
  <p>be sure to see another question I asked which raised related key issues: </p>
  
  <p><a href="https://stackoverflow.com/questions/55613081/in-unity-specifically-where-does-an-await-literally-return-to">In Unity specifically, &quot;where&quot; does an await literally return to?</a></p>
  
  <hr>
  
  <p>For C# experts, Unity is single-threaded<sup>1</sup></p>
  
  <p>It's common to do calculations and such on another thread.</p>
  
  <p>When you do something on another thread, you often use async/wait since, uh, all the good C# programmers say that's the easy way to do that!</p>
  
  <pre><code>void TankExplodes() {
  
      ShowExplosion(); .. ordinary Unity thread
      SoundEffects(); .. ordinary Unity thread
      SendExplosionInfo(); .. it goes to another thread. let's use 'async/wait'
  }
  
  using System.Net.WebSockets;
  async void SendExplosionInfo() {
  
      cws = new ClientWebSocket();
      try {
          await cws.ConnectAsync(u, CancellationToken.None);
          ...
          Scene.NewsFromServer("done!"); // class function to go back to main tread
      }
      catch (Exception e) { ... }
  }
  </code></pre>
  
  <p>OK, so when you do this, you do everything "just as you normally do" when you <strong>launch a thread in a more conventional way</strong> in Unity/C# (so using Thread or whatever or letting a native plugin do it or the OS or whatever the case may be).</p>
  
  <p>Everything works out great.</p>
  
  <p>As a lame Unity programmer who only knows enough C# to get to the end of the day, I have always <strong>assumed</strong> that the async/await pattern above <strong>literally launches another thread</strong>.</p>
  
  <p>In fact, <strong>does the code above literally launch another thread</strong>, or does c#/.Net use some other approach to achieve tasks when you use the natty async/wait pattern?</p>
  
  <p>Maybe it works differently or specifically in the Unity engine from "using C# generally"?  (IDK?)</p>
  
  <p>Note that in Unity, whether or not it is a thread drastically affects how you have to handle the next steps. Hence the question.</p>
  
  <hr>
  
  <p><strong>Issue:</strong> I realize there's lots of discussion about "is await a thread", but, (1) I have never seen this discussed / answered <strong>in the Unity setting</strong> (does it make any difference?  IDK?)  (2) I simply have never seen a clear answer!</p>
  
  <hr>
  
  <p><sup>1</sup> <em>Some ancillary calculations (eg, physics etc) are done on other threads, but the actual "frame based game engine" is one pure thread. (It's impossible to "access" the main engine frame thread in any way whatsoever: when programming, say, a native plugin or some calculation on another thread, you just leave markers and values for the components on the engine frame thread to look at and use when they run each frame.)</em></p>