Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Issue 1881243002: Add a (disabled) test to check against starvation caused by Connector::ReadAllAvailableMessages(). (Closed)

Created:
4 years, 8 months ago by viettrungluu
Modified:
4 years, 8 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -54 lines) Patch
M mojo/public/cpp/bindings/tests/connector_unittest.cc View 6 chunks +130 lines, -54 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
viettrungluu
4 years, 8 months ago (2016-04-12 21:54:21 UTC) #1
vardhan
lgtm
4 years, 8 months ago (2016-04-12 22:09:48 UTC) #2
viettrungluu
4 years, 8 months ago (2016-04-12 22:21:37 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
8902e145002b5ee278f9fbf1022e97912f215c00 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698