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

Unified Diff: src/platform.h

Issue 48123: Added a wait with timeout to the platform semaphore class (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 | « SConstruct ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
===================================================================
--- src/platform.h (revision 1525)
+++ src/platform.h (working copy)
@@ -410,10 +410,16 @@
public:
virtual ~Semaphore() {}
- // Suspends the calling thread until the counter is non zero
+ // Suspends the calling thread until the semaphore counter is non zero
// and then decrements the semaphore counter.
virtual void Wait() = 0;
+ // Suspends the calling thread until the counter is non zero or the timeout
+ // time has passsed. If timeout happens the return value is false and the
+ // counter is unchanged. Otherwise the semaphore counter is decremented and
+ // true is returned. The timeout value is specified in microseconds.
+ virtual bool Wait(int timeout) = 0;
+
// Increments the semaphore counter.
virtual void Signal() = 0;
};
« no previous file with comments | « SConstruct ('k') | src/platform-freebsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698