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

Issue 588593002: mojo: Allow basic RunLoop to be quit from a posted task. (Closed)

Created:
6 years, 3 months ago by qsr
Modified:
6 years, 3 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

mojo: Allow basic RunLoop to be quit from a posted task. Right now, if the runloop is observing handles and a delayed task tries to quit it, it will block until one handle gets a signal. This CL ensures that a delayed task can quit the runloop. R=jamesr@chromium.org Committed: https://crrev.com/8fd73aa30ad43651bb6dc425ef2156073e1a9377 Cr-Commit-Position: refs/heads/master@{#296378}

Patch Set 1 #

Patch Set 2 : Handle UntilIdle case by preempting reading a handle when Quit is called. #

Patch Set 3 : Follow review #

Total comments: 6

Patch Set 4 : Follow review #

Total comments: 1

Patch Set 5 : Do not wait for all task to be done before quitting when running until idle. #

Patch Set 6 : Refactor python tests #

Total comments: 4

Patch Set 7 : Follow review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -35 lines) Patch
M mojo/public/cpp/utility/lib/run_loop.cc View 1 2 3 4 5 6 1 chunk +16 lines, -13 lines 0 comments Download
M mojo/public/cpp/utility/run_loop.h View 1 2 3 4 5 6 2 chunks +23 lines, -11 lines 0 comments Download
M mojo/public/cpp/utility/tests/run_loop_unittest.cc View 1 2 3 4 5 6 1 chunk +20 lines, -0 lines 0 comments Download
M mojo/python/tests/async_wait_unittest.py View 1 2 3 4 5 1 chunk +12 lines, -11 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
qsr
6 years, 3 months ago (2014-09-19 14:35:18 UTC) #1
darin (slow to review)
Can you add a test to run_loop_unittest.cc?
6 years, 3 months ago (2014-09-20 04:53:48 UTC) #3
qsr
On 2014/09/20 04:53:48, darin wrote: > Can you add a test to run_loop_unittest.cc? Done. I ...
6 years, 3 months ago (2014-09-22 10:02:46 UTC) #4
jamesr
I don't understand the comment about RunUntilIdle(). If I post a task that attempts to ...
6 years, 3 months ago (2014-09-22 22:30:18 UTC) #5
qsr
https://chromiumcodereview.appspot.com/588593002/diff/40001/mojo/public/cpp/utility/lib/run_loop.cc File mojo/public/cpp/utility/lib/run_loop.cc (right): https://chromiumcodereview.appspot.com/588593002/diff/40001/mojo/public/cpp/utility/lib/run_loop.cc#newcode115 mojo/public/cpp/utility/lib/run_loop.cc:115: if (!run_state.should_quit && !Wait(true) && delayed_tasks_.empty()) On 2014/09/22 22:30:18, ...
6 years, 3 months ago (2014-09-23 10:40:17 UTC) #6
qsr
On 2014/09/22 22:30:18, jamesr wrote: > I don't understand the comment about RunUntilIdle(). If I ...
6 years, 3 months ago (2014-09-23 10:41:24 UTC) #7
jamesr
https://chromiumcodereview.appspot.com/588593002/diff/60001/mojo/public/cpp/utility/lib/run_loop.cc File mojo/public/cpp/utility/lib/run_loop.cc (right): https://chromiumcodereview.appspot.com/588593002/diff/60001/mojo/public/cpp/utility/lib/run_loop.cc#newcode115 mojo/public/cpp/utility/lib/run_loop.cc:115: if (!did_notify && until_idle && delayed_tasks_.empty()) RunUntilIdle does not ...
6 years, 3 months ago (2014-09-24 04:23:10 UTC) #8
qsr
> RunUntilIdle does not mean run until the delayed task queue is empty, it means ...
6 years, 3 months ago (2014-09-24 07:57:19 UTC) #9
jamesr
OK, that was a bug in RunLoop (almost certainly mine) c++ changes lgtm but I ...
6 years, 3 months ago (2014-09-24 08:04:32 UTC) #10
qsr
On 2014/09/24 08:04:32, jamesr wrote: > OK, that was a bug in RunLoop (almost certainly ...
6 years, 3 months ago (2014-09-24 08:58:49 UTC) #11
qsr
https://codereview.chromium.org/588593002/diff/100001/mojo/public/cpp/utility/lib/run_loop.cc File mojo/public/cpp/utility/lib/run_loop.cc (right): https://codereview.chromium.org/588593002/diff/100001/mojo/public/cpp/utility/lib/run_loop.cc#newcode103 mojo/public/cpp/utility/lib/run_loop.cc:103: void RunLoop::RunInternal(bool until_idle) { On 2014/09/24 08:04:32, jamesr wrote: ...
6 years, 3 months ago (2014-09-24 09:14:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588593002/120001
6 years, 3 months ago (2014-09-24 09:15:22 UTC) #14
commit-bot: I haz the power
Committed patchset #7 (id:120001) as 308c45b69a4f65374b5c602924e877b83412b228
6 years, 3 months ago (2014-09-24 09:57:28 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-24 09:58:08 UTC) #16
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/8fd73aa30ad43651bb6dc425ef2156073e1a9377
Cr-Commit-Position: refs/heads/master@{#296378}

Powered by Google App Engine
This is Rietveld 408576698