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

Issue 3534006: Cleanup parallel_emerge exit conditions to fix hangs. (Closed)

Created:
10 years, 2 months ago by David James
Modified:
9 years, 7 months ago
Reviewers:
Nick Sanders
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Cleanup parallel_emerge exit conditions to fix hangs. I've cleaned up parallel_emerge to send explicit signals to children to tell them when they need to exit. I also cleaned up the CTRL-C handling to correctly print data when interrupted by CTRL-C (previously, the print thread exited first, so the data we wanted on the failure wasn't actually printed.) BUG=chromium-os:5976 TEST=Test several board emerges, including exiting early with CTRL-C. Change-Id: Iab6efc8e1bf868106244a6210bd02e9e8283af37 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=145b4e0

Patch Set 1 #

Total comments: 10

Patch Set 2 : Typo fix #

Patch Set 3 : Comment updates #

Patch Set 4 : More comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -15 lines) Patch
M parallel_emerge View 1 2 3 7 chunks +50 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
davidjames
This should hopefully fix our hanging bugs.
10 years, 2 months ago (2010-10-02 21:40:04 UTC) #1
Nick Sanders
lgtm with fixes http://codereview.chromium.org/3534006/diff/1/2 File parallel_emerge (right): http://codereview.chromium.org/3534006/diff/1/2#newcode1312 parallel_emerge:1312: if not target: Can you add ...
10 years, 2 months ago (2010-10-06 17:36:22 UTC) #2
David James
10 years, 2 months ago (2010-10-06 17:48:15 UTC) #3
http://codereview.chromium.org/3534006/diff/1/2
File parallel_emerge (right):

http://codereview.chromium.org/3534006/diff/1/2#newcode1312
parallel_emerge:1312: if not target:
On 2010/10/06 17:36:25, Nick Sanders wrote:
> Can you add more comments that null target indicates exit, and that you are
> recycling it through the task queue to get everyone to quit.

Done.

http://codereview.chromium.org/3534006/diff/1/2#newcode1425
parallel_emerge:1425: signal.signal(signal.SIGINT, signal.SIG_DFL)
On 2010/10/06 17:36:25, Nick Sanders wrote:
> should this be sigterm?

Done.

http://codereview.chromium.org/3534006/diff/1/2#newcode1437
parallel_emerge:1437: job.Print(seek_locations)
On 2010/10/06 17:36:25, Nick Sanders wrote:
> can you add a comment about what seek_locations is and how Print sets it

Done.

http://codereview.chromium.org/3534006/diff/1/2#newcode1584
parallel_emerge:1584: self._emerge_queue.put(None)
On 2010/10/06 17:36:25, Nick Sanders wrote:
> Also, comment that None object == exit message

Done.

http://codereview.chromium.org/3534006/diff/1/2#newcode1588
parallel_emerge:1588: # Kill print queue.
On 2010/10/06 17:36:25, Nick Sanders wrote:
> also comment about how print queue must run until after all other threads
close

Done.

Powered by Google App Engine
This is Rietveld 408576698