+1 Darin
+1 Maruel
It was/is impressively hard to modify the message loop/pump without harming
performance, and that performance is so central, that it tends to be visible
in top level browser benchmarks.
It was very difficult to make this body of code as simple() as it is.
...and it is not
MessageLoop is not designed to be subclassed. Call me a minimalist, but I
think it damages slightly the readability of the code to have methods marked
virtual that do not need to be. That said, I love mocking. Since a lot of
code doesn't actually need a MessageLoop so much as a place to post
I'm slightly against. No real reason :) except that it'll definitely
bloat the WPO build.
M-A
On Tue, Aug 4, 2009 at 2:37 AM, Darin Fisherda...@chromium.org wrote:
MessageLoop is not designed to be subclassed. Call me a minimalist, but I
think it damages slightly the readability of the code
I think it'd interesting to try. I imagine we'd need some helper gmock
actions to take care of executing/deleting tasks.
Out of curiosity, would adding a HasPendingTasks() method solve your current
testing issue?
On Tue, Aug 4, 2009 at 6:28 AM, Marc-Antoine Ruel mar...@chromium.orgwrote:
I'm
I don't think we want a HasPendingTasks method. Consider that the
MessageLoop may be used by multiple threads. Any code depending on
HasPendingTasks is likely to be fragile. Also, a MessageLoop may have work
to do that is not task related.
-Darin
On Tue, Aug 4, 2009 at 6:41 AM, Andrew
Responding to three separate parts of the thread (too bad we aren't using
Wave :P).
On Tue, Aug 4, 2009 at 7:35 AM, Darin Fisher da...@chromium.org wrote:
I don't think we want a HasPendingTasks method. Consider that the
MessageLoop may be used by multiple threads. Any code depending on
On Tue, Aug 4, 2009 at 2:01 PM, Albert J. Wong (王重傑) ajw...@chromium.orgwrote:
On Tue, Aug 4, 2009 at 6:28 AM, Marc-Antoine Ruel
mar...@chromium.orgwrote:
I'm slightly against. No real reason :) except that it'll definitely
bloat the WPO build.
How bad would the bloat be?
Please get
On Mon, Aug 3, 2009 at 8:23 PM, Albert J. Wong (王重傑)ajw...@chromium.org wrote:
I've noticed that most public functions on MessageLoop are non-virtual. How
bad would it be to make PostTask, and its variants, virtual? Are the perf
implications or similar that would be bad?
I'd like to be able