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

Unified Diff: base/synchronization/waitable_event.h

Issue 2433773005: Move OS_WIN specific logic in MessagePumpDefault::Run into waitable_event_win.cc (Closed)
Patch Set: Addressed CR feedback Created 4 years, 1 month 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/message_loop/message_pump_default.cc ('k') | base/synchronization/waitable_event_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/waitable_event.h
diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h
index 3863e98455ee10e74f1ee6c40994aadd5012d947..761965f03a0f07b37b1115f975de822686266695 100644
--- a/base/synchronization/waitable_event.h
+++ b/base/synchronization/waitable_event.h
@@ -25,6 +25,7 @@
namespace base {
class TimeDelta;
+class TimeTicks;
// A WaitableEvent can be a useful thread synchronization tool when you want to
// allow one thread to wait for another thread to finish some work. For
@@ -86,12 +87,17 @@ class BASE_EXPORT WaitableEvent {
// delete e;
void Wait();
- // Wait up until max_time has passed for the event to be signaled. Returns
- // true if the event was signaled. If this method returns false, then it
- // does not necessarily mean that max_time was exceeded.
+ // Wait up until wait_delta has passed for the event to be signaled. Returns
+ // true if the event was signaled.
//
// TimedWait can synchronise its own destruction like |Wait|.
- bool TimedWait(const TimeDelta& max_time);
+ bool TimedWait(const TimeDelta& wait_delta);
+
+ // Wait up until end_time deadline has passed for the event to be signaled.
+ // Return true if the event was signaled.
+ //
+ // TimedWaitUntil can synchronise its own destruction like |Wait|.
+ bool TimedWaitUntil(const TimeTicks& end_time);
#if defined(OS_WIN)
HANDLE handle() const { return handle_.Get(); }
« no previous file with comments | « base/message_loop/message_pump_default.cc ('k') | base/synchronization/waitable_event_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698