Commit 94936efa authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Update mojo documentation to describe sequence-affinity of callbacks.

Change-Id: I34d76c9d3de95f66610bbd0124b476d7d35f875c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406598
Commit-Queue: Erik Chen <erikchen@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Auto-Submit: Erik Chen <erikchen@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#806316}
parent 83d52b3a
......@@ -318,9 +318,11 @@ 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. 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:
asynchronously `receive` the response. The parameter `GetTailCallback` passed to
the implementation of `GetTail` is sequence-affine. It must be invoked on the
same sequence that `GetTail` is called on. 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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment