std::launch::async is blocking like a sync process
<p>I am running Visual Studio 2012 and attempting to learn how std::async works. I have created a very simple C++ console application:</p>

<pre><code>#include "stdafx.h"
#include &lt;future&gt;
#include &lt;iostream&gt;

void foo() {
    std::cout &lt;&lt; "foo() thread sleep" &lt;&lt; std::endl;
    std::this_thread::sleep_for(std::chrono::seconds(5));
    std::cout &lt;&lt; "foo() thread awake" &lt;&lt; std::endl;
}

int main()
{
    std::future&lt;void&gt; res = std::async(std::launch::async, foo);
    res.get();
    std::cout &lt;&lt; "MAIN THREAD" &lt;&lt; std::endl;

    system("pause");

    return 0;
}
</code></pre>

<p>My initial expectation was to see "MAIN THREAD" printout appearing <strong>before</strong> "foo() thread awake" since the two threads are running asynchronously, with the foo() trailing behind due to its sleeping behavior. However, that is not what is actually happening. The call to res.get() blocks until foo() wakes up, and only then does it get to the "MAIN THREAD" printout. This is indicative of a synchronous behavior, so I am wondering what if perhaps I am either missing something, or not fully grasping the implementation. I have looked through numerous posts on this matter, but still cannot make any sense of it. Any help would be appreciated!</p>