llvm-project/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr
Eric Fiselier 9a37bc91d2 Fix race conditions in test class used throughout the std::thread tests.
The test class 'G' reads and writes to the same static variables in its
constructor, destructor and call operator. When threads are
constructed using `std::thread t((G()))` there is a race condition between the
destruction of the temporary and the execution of `G::operator()()`.

The fix is to simply create the input before creating the thread.

llvm-svn: 233946
2015-04-02 21:12:17 +00:00
..
F.pass.cpp
constr.fail.cpp
copy.fail.cpp
default.pass.cpp
move.pass.cpp Fix race conditions in test class used throughout the std::thread tests. 2015-04-02 21:12:17 +00:00