[libcxx testing] Fix bot failure in my last commit
authorDavid Zarzycki <dave@znu.io>
Wed, 3 Jun 2020 15:23:27 +0000 (11:23 -0400)
committerDavid Zarzycki <dave@znu.io>
Wed, 3 Jun 2020 15:28:14 +0000 (11:28 -0400)
libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp

index ebac642..0e19e59 100644 (file)
@@ -18,6 +18,7 @@
 #include <mutex>
 #include <thread>
 #include <vector>
+#include <atomic>
 #include <cassert>
 
 #include "test_macros.h"
@@ -45,7 +46,7 @@ int main(int, char**)
   notReady = threadCount;
   std::vector<std::thread> threads;
   for (unsigned i = 0; i < threadCount; i++)
-    threads.push_back(std::thread(helper));
+    threads.emplace_back(helper);
   {
     while (notReady > 0)
       std::this_thread::yield();