Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1857)

Unified Diff: base/synchronization/condition_variable_posix.cc

Issue 2047433004: content: Add heartbeat trace for CategorizedWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/synchronization/condition_variable.h ('k') | base/synchronization/condition_variable_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/condition_variable_posix.cc
diff --git a/base/synchronization/condition_variable_posix.cc b/base/synchronization/condition_variable_posix.cc
index d86fd180ec7f3056dbf22cf0997826b04d7fdde3..a0c101309c2935120007ea57a97c6953c84c3299 100644
--- a/base/synchronization/condition_variable_posix.cc
+++ b/base/synchronization/condition_variable_posix.cc
@@ -73,7 +73,7 @@ void ConditionVariable::Wait() {
#endif
}
-void ConditionVariable::TimedWait(const TimeDelta& max_time) {
+bool ConditionVariable::TimedWait(const TimeDelta& max_time) {
base::ThreadRestrictions::AssertWaitAllowed();
int64_t usecs = max_time.InMicroseconds();
struct timespec relative_time;
@@ -122,6 +122,8 @@ void ConditionVariable::TimedWait(const TimeDelta& max_time) {
#if DCHECK_IS_ON()
user_lock_->CheckUnheldAndMark();
#endif
+
+ return rv == ETIMEDOUT;
}
void ConditionVariable::Broadcast() {
« no previous file with comments | « base/synchronization/condition_variable.h ('k') | base/synchronization/condition_variable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698