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

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

Issue 1346383004: EDK: Remove MOJO_SYSTEM_IMPL_EXPORT, system_impl_export.h, etc. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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/async_waiter.h ('k') | mojo/edk/system/awakable_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/awakable.h
diff --git a/mojo/edk/system/awakable.h b/mojo/edk/system/awakable.h
index 057d3ebf4f84d2405e000032e6815f03110c7821..c150a78707b8a074ba8113d04858662e868f4b96 100644
--- a/mojo/edk/system/awakable.h
+++ b/mojo/edk/system/awakable.h
@@ -7,25 +7,26 @@
#include <stdint.h>
-#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/c/system/types.h"
namespace mojo {
namespace system {
-// An interface that may be waited on |AwakableList|.
-class MOJO_SYSTEM_IMPL_EXPORT Awakable {
+// An interface for things that may be awoken. E.g., |Waiter| is an
+// implementation that blocks while waiting to be awoken.
+class Awakable {
public:
// |Awake()| must satisfy the following contract:
- // * As this is called from any thread, this must be thread-safe.
- // * As this is called inside a lock, this must not call anything that takes
- // "non-terminal" locks, i.e., those which are always safe to take.
- // This should return false if this must not be called again for the same
- // reason (e.g., for the same call to |AwakableList::Add()|).
+ // - It must be thread-safe.
+ // - Since it is called with a mutex held, it must not call anything that
+ // takes "non-terminal" locks, i.e., those which are always safe to take.
+ // - It should return false if it must not be called again for the same
+ // reason (e.g., for the same call to |AwakableList::Add()|).
virtual bool Awake(MojoResult result, uintptr_t context) = 0;
protected:
Awakable() {}
+ virtual ~Awakable() {}
};
} // namespace system
« no previous file with comments | « mojo/edk/system/async_waiter.h ('k') | mojo/edk/system/awakable_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698