summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-11-18 10:12:51 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2016-11-18 10:13:18 +0000
commite2fc98e88106b9cfa44eeacc6765c291feda04a8 (patch)
treeba3f40b46f3dfc15057b6e1a8634a240d5d846e3
parent368479e345cc8c8750db5144ccc7fae5fc41b1e6 (diff)
Fix valgrind issue with thread_pool_test.
Make sure the task list is empty at the end of the test. Test: thread_pool_test Change-Id: I155a8eb90dc83a0dd9128f0c0bc64deeba7a92e9
-rw-r--r--runtime/thread_pool_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/thread_pool_test.cc b/runtime/thread_pool_test.cc
index 2ae2ecff4e..89e9005c1a 100644
--- a/runtime/thread_pool_test.cc
+++ b/runtime/thread_pool_test.cc
@@ -114,6 +114,8 @@ TEST_F(ThreadPoolTest, StopWait) {
thread_pool.StopWorkers(self);
thread_pool.Wait(self, false, false); // We should not deadlock here.
+ // Drain the task list.
+ thread_pool.Wait(self, /* do_work */ true, false); // We should not deadlock here.
}
class TreeTask : public Task {