Skip to content

Commit

Permalink
Explicitly say what sequence Mojo callbacks run on
Browse files Browse the repository at this point in the history
It can be a point of confusion for newcomers.

BUG=

Change-Id: I27c854087e5978f4c89fb7ed10f1b2e852a4382a
Reviewed-on: https://chromium-review.googlesource.com/c/1382657
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Andrew Moylan <amoylan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617731}
  • Loading branch information
Andrew Moylan authored and Commit Bot committed Dec 19, 2018
1 parent a8d6e89 commit 9216d37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mojo/public/cpp/bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ class Logger {
As before, both clients and implementations of this interface use the same
signature for the `GetTail` method: implementations use the `callback` argument
to *respond* to the request, while clients pass a `callback` argument to
asynchronously `receive` the response. Here's an updated implementation:
asynchronously `receive` the response. A client's `callback` runs on the same
sequence on which they invoked `GetTail` (the sequence to which their `logger`
is bound). Here's an updated implementation:
```cpp
class LoggerImpl : public sample::mojom::Logger {
Expand Down

0 comments on commit 9216d37

Please sign in to comment.