Mojo EDK: Introduce MojoQueryHandleSignalsState API
The only reliable way to inquire about handle signals now
is to MojoWait (for e.g. 0 deadline). As a precursor to
removing the wait APIs in favor of watchers, we need to
retain the ability to efficiently query a handle's signals
state.
Rather than trying to retrofit the watcher APIs to support
this use case in similar fashion to the wait APIs, this adds
an API explicitly for the purpose of querying signals state.
Adds a corresponding method to the C++ mojo::Handle
and moves the EDK's internal HandleSignalsState helper class
to mojo/public/cpp/system, adding some convenient accessors.
Also introduces the API to the JS and Java libraries, and
replaces any 0-deadline waits in those languages with usage of
this new API.
Because waitMany is not used in these languages (except for
tests which test waitMany...) it has been removed. wait() is
unused in Java after this change, so it has also been removed.
Finally, this moves several tests away from calling MojoWait
directly, instead using a simplified Watcher-based wait
implementation in MojoTestBase.
BUG=700171
TBR=jam@chromium.org
Review-Url: https://codereview.chromium.org/2741033003
Cr-Original-Commit-Position: refs/heads/master@{#457315}
Committed: https://chromium.googlesource.com/chromium/src/+/853496a78ae997c2d8b80f3cd8fabf9423fb3361
Review-Url: https://codereview.chromium.org/2741033003
Cr-Commit-Position: refs/heads/master@{#457378}
CrOS-Libchrome-Original-Commit: c7949549ac0c42252c8b3f2c08d4cb34b65dc869
33 files changed