Attention needed from Devon Loehr
Roshan Singh has uploaded change 8899166 for review![Open in Gerrit]()
Roshan Singh <ros...@chromium.org> would like Devon Loehr and Chromium LUCI CQ to review this change.
Commit message
Revert "Allow pausing a Rust Mojo MessagePipeWatcher"
This reverts commit cc9ab7a51da98cf51297921c6171fad4cf4c5cc5.
Reason for revert: The follow-up that needed pause support
(https://crrev.com/c/8854149) was abandoned. Only the tests added by
this CL pause the watcher. FlushForTesting only needs an ordered reply.
Failure Link: N/A (voluntary revert)
Original change's description:
> Allow pausing a Rust Mojo MessagePipeWatcher
>
> Previously, once a MessagePipeWatcher started processing messages
> there was no way to stop it. The router needs to pause reads while
> it handles a flush control message (https://crrev.com/c/8854149).
>
> This CL adds `pause_processing`, which is undone by calling
> `begin_processing` again. While paused, the watcher leaves incoming
> messages and the disconnect notification in the pipe, and delivers
> them in order afterwards. It works by having the task that we post
> for each message check whether we're paused before it reads anything.
>
> Some existing behaviors change:
> - The disconnect handler now runs from a task that makes the same
> check, so `is_connected` changes when that task runs instead of
> when the trap fires.
> - The disconnect handler no longer runs if the watcher is dropped
> before that task runs.
> - If a message is already waiting when we arm the trap, its task is
> posted to the watcher's runner instead of the current default one,
> so that `begin_processing` works from any sequence.
>
> Bug: 573683206
> Change-Id: I8b845aaa1dd11faae7d804bff8ed5b66c7558b40
> Reviewed-on: https://crrev.com/c/8854109
> Reviewed-by: Devon Loehr <dlo...@google.com>
> Commit-Queue: Roshan Singh <ros...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1758910}
Bug: 573683206
Change-Id: Id61a2f7ccee3eecb9c92c65d31db58a4d090e361
Change information
Files:
- M mojo/public/rust/bindings/message_pipe_watcher.rs
- M mojo/public/rust/bindings/test/tests.rs
Change size: L
Delta: 2 files changed, 39 insertions(+), 304 deletions(-)
Open in GerritRelated details
Attention is currently required from:
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id61a2f7ccee3eecb9c92c65d31db58a4d090e361
Gerrit-Change-Number: 8899166
Gerrit-PatchSet: 1