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

Unified Diff: mojo/edk/system/waiter.h

Issue 2088833003: Add different behavior to AwakableList for "persistent" vs "one-shot" awakables. (Closed) Base URL: https://github.com/domokit/mojo.git@work793_wait_set_4.5
Patch Set: 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 | « mojo/edk/system/wait_set_dispatcher.cc ('k') | mojo/edk/system/waiter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/waiter.h
diff --git a/mojo/edk/system/waiter.h b/mojo/edk/system/waiter.h
index afe5b89ae587f4aab6704e1e86ff3f25e446efcd..a2e97fc7423c9618d8b81e859404db72207968fc 100644
--- a/mojo/edk/system/waiter.h
+++ b/mojo/edk/system/waiter.h
@@ -18,10 +18,15 @@
namespace mojo {
namespace system {
-// IMPORTANT (all-caps gets your attention, right?): |Waiter| methods are called
-// under other locks, in particular, |Dispatcher::lock_|s, so |Waiter| methods
-// must never call out to other objects (in particular, |Dispatcher|s). This
-// class is thread-safe.
+// An implementation of |Awakable| that is used for blocking waits. This should
+// be used in a non-persistent way (i.e., |Awake()| should be called at most
+// once by each source, and only for "leading edges").
+//
+// IMPORTANT: |Waiter| methods are called under other locks, in particular,
+// |Dispatcher::lock_|s, so |Waiter| methods must never call out to other
+// objects (in particular, |Dispatcher|s).
+//
+// This class is thread-safe.
class Waiter final : public Awakable {
public:
Waiter();
@@ -49,7 +54,7 @@ class Waiter final : public Awakable {
HandleSignalsState* signals_state);
// |Awakable| implementation:
- bool Awake(uint64_t context,
+ void Awake(uint64_t context,
AwakeReason reason,
const HandleSignalsState& signals_state) override;
« no previous file with comments | « mojo/edk/system/wait_set_dispatcher.cc ('k') | mojo/edk/system/waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698