forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes the Watcher C API as described in this post: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-mojo/UcA97R4IznI Makes watchers a first-class non-transferable handle type in Mojo, allows multiple distinct events to be watched by a single watcher, and requires watchers to be explicitly armed before a notification will fire. Also now allows for cancellation (and watcher closure) from within notification callbacks, simplifying cancellation logic and avoiding any possibility of EDK deadlocks caused by cancellations, during watch notification. Updates the Watcher class in mojo/public/cpp/system to reflect the new model, adding an explicit ArmingPolicy to allow users to select manual or automatic arming. Also renames it to SimpleWatcher to adequately convey that this is only a simplified helper class that does not utilize the full power of watchers. Automatic arming provides imperfect edge-triggered behavior, which is still an improvement over the old behavior in many cases. Manual arming is used in the bindings Connector to ensure that all messages are flushed from a pipe before control returns from a handle-ready notification, and is also now used for Watchers which watch a data pipe handle. Other users of the Watcher C API (namely Blink's MojoWatcher and content's MessagePort) have also been adapted to the new API. BUG=693595,700171 Review-Url: https://codereview.chromium.org/2725133002 Cr-Commit-Position: refs/heads/master@{#457269}
- Loading branch information
Showing
84 changed files
with
3,976 additions
and
1,565 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.