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

Side by Side Diff: tools/testrunner/local/pool.py

Issue 286973004: Fix keyboard interrupt in test driver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from multiprocessing import Event, Process, Queue 6 from multiprocessing import Event, Process, Queue
7 7
8 class NormalResult(): 8 class NormalResult():
9 def __init__(self, result): 9 def __init__(self, result):
10 self.result = result 10 self.result = result
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 # they empty the queue buffer. 127 # they empty the queue buffer.
128 self.done.set() 128 self.done.set()
129 129
130 for p in self.processes: 130 for p in self.processes:
131 # During normal tear down the workers block on get(). Feed a poison pill 131 # During normal tear down the workers block on get(). Feed a poison pill
132 # per worker to make them stop. 132 # per worker to make them stop.
133 self.work_queue.put("STOP") 133 self.work_queue.put("STOP")
134 134
135 for p in self.processes: 135 for p in self.processes:
136 p.join() 136 p.join()
137
138 # Drain the queues to prevent failures when queues are garbage collected.
139 try:
140 while True: self.work_queue.get(False)
141 except:
142 pass
143 try:
144 while True: self.done_queue.get(False)
145 except:
146 pass
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698