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

Unified Diff: src/base/platform/semaphore.h

Issue 2270703002: Add test for posting a single task to the worker pool (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: different approach Created 4 years, 4 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 | « no previous file | src/libplatform/task-queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/semaphore.h
diff --git a/src/base/platform/semaphore.h b/src/base/platform/semaphore.h
index 18700d1ba005f01a77a2fb43f7c6b3219200f382..39029c83fc3b427d050421655bcfd6558b37f69d 100644
--- a/src/base/platform/semaphore.h
+++ b/src/base/platform/semaphore.h
@@ -39,14 +39,13 @@ class Semaphore final {
// Increments the semaphore counter.
void Signal();
- // Suspends the calling thread until the semaphore counter is non zero
- // and then decrements the semaphore counter.
+ // Decrements the semaphore counter if it is positive, or blocks until it
+ // becomes positive and then decrements the counter.
void Wait();
- // Suspends the calling thread until the counter is non zero or the timeout
- // time has passed. If timeout happens the return value is false and the
- // counter is unchanged. Otherwise the semaphore counter is decremented and
- // true is returned.
+ // Like Wait() but returns after rel_time time has passed. If the timeout
+ // happens the return value is false and the counter is unchanged. Otherwise
+ // the semaphore counter is decremented and true is returned.
bool WaitFor(const TimeDelta& rel_time) WARN_UNUSED_RESULT;
#if V8_OS_MACOSX
« no previous file with comments | « no previous file | src/libplatform/task-queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698