1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix deadlock in ThreadPool unittest.

(Yes, this only deadlocks on a computer with a single core; I'm using
a virtual machine.)

llvm-svn: 271855
This commit is contained in:
Eli Friedman 2016-06-05 21:15:46 +00:00
parent 1d6e137f97
commit d8092c740d

View File

@ -135,7 +135,7 @@ TEST_F(ThreadPoolTest, Async) {
TEST_F(ThreadPoolTest, GetFuture) { TEST_F(ThreadPoolTest, GetFuture) {
CHECK_UNSUPPORTED(); CHECK_UNSUPPORTED();
ThreadPool Pool; ThreadPool Pool{2};
std::atomic_int i{0}; std::atomic_int i{0};
Pool.async([this, &i] { Pool.async([this, &i] {
waitForMainThread(); waitForMainThread();