DescriptionAdd a (disabled) test to check against starvation caused by Connector::ReadAllAvailableMessages().
It's disabled, since we currently like to starve. D'oh.
(I also slightly rearranged the file.)
A simple, if somewhat hacky, fix to this immediate starvation problem
would be to have ReadAllAvailableMessages() count the number of messages
it processes, and go through the "should wait" code path if the number
exceeds some threshold. Of course, this is somewhat dependent on the
run/message loop implementation.
We should probably have more generic no-starvation tests, that work with
any run/message loop (i.e., Environment). But such tests are tricky
without additional support from MojoAsyncWaiter (which doesn't know
about things like posting tasks). We could/should also check that other
watched handles aren't starved -- this we could do without changing
MojoAsyncWaiter.
R=vardhan@google.com
BUG=#604
Committed: https://chromium.googlesource.com/external/mojo/+/8902e145002b5ee278f9fbf1022e97912f215c00
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|