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

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: 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 // Awakable is a callback that is called by AwakableList.
viettrungluu 2014/12/03 21:18:13 nit: For consistency with the rest of the director
Hajime Morrita 2014/12/03 21:44:09 Done.
16 // The Awake() callback must satisfy following contract:
viettrungluu 2014/12/03 21:18:13 Put this comment above |Awake()|. You can rewrite
Hajime Morrita 2014/12/03 21:44:09 Done.
17 //
18 // * As it is called from any thread, the callback must be thread-safe.
viettrungluu 2014/12/03 21:18:13 "it" -> "this", "the callback" -> "this"
Hajime Morrita 2014/12/03 21:44:09 Done.
19 // * As it is called inside a lock, the callback must not call API that
viettrungluu 2014/12/03 21:18:13 "it" -> "this", "the callback" -> "this" More sig
Hajime Morrita 2014/12/03 21:44:09 That is right. "any lock" is unnecessarily restric
20 // does lock any Mojo-related objects.
21 class Awakable {
22 public:
23 virtual void Awake(MojoResult result, uintptr_t context) = 0;
24 };
25
26 } // namespace system
27 } // namespace mojo
28
29 #endif // MOJO_EDK_SYSTEM_AWAKABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698