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

Side by Side Diff: mojo/edk/system/awakable.h

Issue 779503003: Extract Awakable from Waiter (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Review Update Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_SYSTEM_AWAKABLE_H_
6 #define MOJO_EDK_SYSTEM_AWAKABLE_H_
7
8 #include <stdint.h>
9
10 #include "mojo/public/c/system/types.h"
11
12 namespace mojo {
13 namespace system {
14
15 // An interface that may be waited on |AwakableList|.
16 class Awakable {
17 public:
18 // |Awake()| must satisfy the following contract:
19 // * As this is called from any thread, this must be thread-safe.
20 // * As this is called inside a lock, this must not call anything that takes
21 // "non-terminal" locks, i.e., those which are always safe to take.
22 virtual void Awake(MojoResult result, uintptr_t context) = 0;
23
24 protected:
25 Awakable() {}
26 };
27
28 } // namespace system
29 } // namespace mojo
30
31 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698