title: Does async always use another thread/core/process in C++?
body: <p>As I know <code>async</code> executes a function in another thread/process/core and doesn't block the main thread, but is that always the case?</p>
  
  <p>I have following code:</p>
  
  <pre><code>async(launch::async,[]()
  {
      Sleep(1000);
      puts("async");
  });
  puts("main");
  </code></pre>
  
  <p>It prints <code>async main</code>, so does that mean that the main thread waits until <code>async</code> finishes?</p>
  
  <p>If I change to following:</p>
  
  <pre><code>auto f = async(launch::async,[]() // add "auto f = "
  {
      Sleep(1000);
      puts("async");
  });
  puts("main");
  </code></pre>
  
  <p>It prints <code>main async</code>. This makes it seem like main doesn't wait for <code>async</code> to finish.</p>