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

Unified Diff: mojo/edk/system/async_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 | « no previous file | mojo/edk/system/async_waiter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/async_waiter.h
diff --git a/mojo/edk/system/async_waiter.h b/mojo/edk/system/async_waiter.h
index 5e405bf790503b249dd8d83ee734f43770fc022f..fd8e2bc9fdfa4b86a72b55e4e80a6485c5f52ca4 100644
--- a/mojo/edk/system/async_waiter.h
+++ b/mojo/edk/system/async_waiter.h
@@ -14,7 +14,9 @@
namespace mojo {
namespace system {
-// An |Awakable| implementation that just calls a given callback object.
+// An |Awakable| implementation that just calls a given callback object. It
+// 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").
class AsyncWaiter final : public Awakable {
public:
using AwakeCallback = std::function<void(MojoResult)>;
@@ -25,7 +27,7 @@ class AsyncWaiter final : public Awakable {
private:
// |Awakable| implementation:
- bool Awake(uint64_t context,
+ void Awake(uint64_t context,
AwakeReason reason,
const HandleSignalsState& signals_state) override;
« no previous file with comments | « no previous file | mojo/edk/system/async_waiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698