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

Issue 1921183002: Add a mechanism to extend a libevent based message pump. (Closed)

Created:
4 years, 8 months ago by jeffbrown
Modified:
4 years, 7 months ago
Reviewers:
jamesr, abarth
CC:
mojo-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/domokit/base@master
Target Ref:
refs/heads/master
Project:
mojo_base
Visibility:
Public.

Description

Add a mechanism to extend a libevent based message pump. Added an API to allow additional event sources to be injected into the message pump to be polled on each iteration. This is part of a change to ensure that the X11 event queue is serviced in a timely manner. Bug: 661 BUG= R=abarth@google.com, jamesr@chromium.org Committed: efbff4237a8fb7075af1e98fee674b77d8580753

Patch Set 1 #

Patch Set 2 : allow at most one extra event source #

Patch Set 3 : fix formatting #

Patch Set 4 : added test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -1 line) Patch
M message_loop/message_loop.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M message_loop/message_loop.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M message_loop/message_pump_libevent.h View 1 4 chunks +18 lines, -0 lines 0 comments Download
M message_loop/message_pump_libevent.cc View 1 4 chunks +20 lines, -1 line 0 comments Download
M message_loop/message_pump_libevent_unittest.cc View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
jeffbrown
4 years, 8 months ago (2016-04-26 02:42:32 UTC) #2
abarth
How does Chromium solve this problem on Linux?
4 years, 8 months ago (2016-04-26 02:45:01 UTC) #3
abarth
LGTM but I'm not a base expert. Probably should get input from James.
4 years, 8 months ago (2016-04-26 04:44:53 UTC) #4
jamesr
On 2016/04/26 at 02:45:01, abarth wrote: > How does Chromium solve this problem on Linux? ...
4 years, 8 months ago (2016-04-26 23:52:14 UTC) #5
jamesr
This is a really hot place in the loop to add an extra dispatch. When ...
4 years, 8 months ago (2016-04-26 23:53:31 UTC) #6
jamesr
(copying from email back to the review for posterity) jeffbrown says: > Glib does exactly ...
4 years, 8 months ago (2016-04-27 00:39:56 UTC) #7
jeffbrown
> > And if we want the loop to be responsive (not get starved by ...
4 years, 7 months ago (2016-04-27 06:14:21 UTC) #8
jamesr
On 2016/04/27 at 06:14:21, jeffbrown wrote: > > > And if we want the loop ...
4 years, 7 months ago (2016-04-27 17:19:31 UTC) #9
jeffbrown
Respectfully, both the old glib-based and libevent-based code prioritized dispatching X11 events as soon as ...
4 years, 7 months ago (2016-04-27 20:33:24 UTC) #10
jamesr
I agree that prioritization can be important, but this implementation proposal simply won't work on ...
4 years, 7 months ago (2016-04-28 18:27:49 UTC) #11
jamesr
The policy decision is over in the X11 event source, so that doesn't have to ...
4 years, 7 months ago (2016-04-28 20:52:47 UTC) #12
jeffbrown
4 years, 7 months ago (2016-05-04 20:00:52 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
efbff4237a8fb7075af1e98fee674b77d8580753 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698