diff options
author | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 03:09:42 +0000 |
---|---|---|
committer | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 03:09:42 +0000 |
commit | 866cf337ee0834ccc1555cb645280b4a6047e4c3 (patch) | |
tree | fa3350ee688266d960f169328cef333825278df3 /base/threading | |
parent | 8d3fa5ee110654c60722e33c414093fbc8a1ae94 (diff) | |
download | chromium_src-866cf337ee0834ccc1555cb645280b4a6047e4c3.zip chromium_src-866cf337ee0834ccc1555cb645280b4a6047e4c3.tar.gz chromium_src-866cf337ee0834ccc1555cb645280b4a6047e4c3.tar.bz2 |
Modify WaitableEvent::Wait() to return void
Currently, WaitableEvent::Wait() returns bool. However, the Windows
implementation DCHECKs that the return value is true and the POSIX
implementation can never return false. Also, all call sites that use the return
value simply DCHECK that it's true.
This change modifies the method to return void, adds a DCHECK in the POSIX
implementation and updates call sites.
Review URL: http://codereview.chromium.org/8221021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r-- | base/threading/worker_pool_posix_unittest.cc | 2 | ||||
-rw-r--r-- | base/threading/worker_pool_unittest.cc | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/base/threading/worker_pool_posix_unittest.cc b/base/threading/worker_pool_posix_unittest.cc index 01722f0..97e8807 100644 --- a/base/threading/worker_pool_posix_unittest.cc +++ b/base/threading/worker_pool_posix_unittest.cc @@ -106,7 +106,7 @@ class BlockingIncrementingTask : public Task { (*num_waiting_to_start_)++; } num_waiting_to_start_cv_->Signal(); - CHECK(start_->Wait()); + start_->Wait(); incrementer_.Run(); } diff --git a/base/threading/worker_pool_unittest.cc b/base/threading/worker_pool_unittest.cc index 2d2b055..bbdd8cf 100644 --- a/base/threading/worker_pool_unittest.cc +++ b/base/threading/worker_pool_unittest.cc @@ -34,15 +34,12 @@ class PostTaskTestTask : public Task { TEST_F(WorkerPoolTest, PostTask) { WaitableEvent test_event(false, false); WaitableEvent long_test_event(false, false); - bool signaled; WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&test_event), false); WorkerPool::PostTask(FROM_HERE, new PostTaskTestTask(&long_test_event), true); - signaled = test_event.Wait(); - EXPECT_TRUE(signaled); - signaled = long_test_event.Wait(); - EXPECT_TRUE(signaled); + test_event.Wait(); + long_test_event.Wait(); } } // namespace base |