std::thread::join() hangs if called after main() exits when using VS2012 RC

Tracing through Fraser’s sample code in his connect bug (https://connect.microsoft.com/VisualStudio/feedback/details/747145) with VS2012 RTM seems to show a fairly straightforward case of deadlocking. This likely isn’t specific to std::thread – likely _beginthreadex suffers the same fate. What I see in the debugger is the following: On the main thread, the main() function has completed, the process … Read more