summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/thread_pool_test.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/thread_pool_test.cc b/runtime/thread_pool_test.cc
index 4bd44dcb0f..d5f17d17b1 100644
--- a/runtime/thread_pool_test.cc
+++ b/runtime/thread_pool_test.cc
@@ -95,11 +95,7 @@ TEST_F(ThreadPoolTest, StopStart) {
EXPECT_EQ(0, bad_count.LoadSequentiallyConsistent());
// Allow tasks to finish up and delete themselves.
thread_pool.StartWorkers(self);
- while (count.LoadSequentiallyConsistent() != num_tasks &&
- bad_count.LoadSequentiallyConsistent() != 1) {
- usleep(200);
- }
- thread_pool.StopWorkers(self);
+ thread_pool.Wait(self, false, false);
}
class TreeTask : public Task {