Title: [119986] trunk/Tools
- Revision
- 119986
- Author
- [email protected]
- Date
- 2012-06-11 10:39:41 -0700 (Mon, 11 Jun 2012)
Log Message
rebaseline from garden-o-matic leaves N processes each time it is run
https://bugs.webkit.org/show_bug.cgi?id=88586
Reviewed by Dirk Pranke.
This appears to only be a problem on python 2.7. Maybe a bug causing
pools to not be garbage collected?
* Scripts/webkitpy/common/system/executive.py:
(Executive.run_in_parallel): close() and join() the process pool.
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_in_parallel):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (119985 => 119986)
--- trunk/Tools/ChangeLog 2012-06-11 17:22:07 UTC (rev 119985)
+++ trunk/Tools/ChangeLog 2012-06-11 17:39:41 UTC (rev 119986)
@@ -1,3 +1,18 @@
+2012-06-11 Tony Chang <[email protected]>
+
+ rebaseline from garden-o-matic leaves N processes each time it is run
+ https://bugs.webkit.org/show_bug.cgi?id=88586
+
+ Reviewed by Dirk Pranke.
+
+ This appears to only be a problem on python 2.7. Maybe a bug causing
+ pools to not be garbage collected?
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.run_in_parallel): close() and join() the process pool.
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ExecutiveTest.test_run_in_parallel):
+
2012-06-11 Zoltan Horvath <[email protected]>
[Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive.py (119985 => 119986)
--- trunk/Tools/Scripts/webkitpy/common/system/executive.py 2012-06-11 17:22:07 UTC (rev 119985)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive.py 2012-06-11 17:39:41 UTC (rev 119986)
@@ -456,7 +456,11 @@
"""Runs a list of (cmd_line list, cwd string) tuples in parallel and returns a list of (retcode, stdout, stderr) tuples."""
if sys.platform in ('cygwin', 'win32'):
return map(_run_command_thunk, command_lines_and_cwds)
- return multiprocessing.Pool(processes=processes).map(_run_command_thunk, command_lines_and_cwds)
+ pool = multiprocessing.Pool(processes=processes)
+ results = pool.map(_run_command_thunk, command_lines_and_cwds)
+ pool.close()
+ pool.join()
+ return results
def _run_command_thunk(cmd_line_and_cwd):
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py (119985 => 119986)
--- trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py 2012-06-11 17:22:07 UTC (rev 119985)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py 2012-06-11 17:39:41 UTC (rev 119986)
@@ -220,6 +220,7 @@
def test_run_in_parallel(self):
if sys.platform in ("win32", "cygwin"):
return # This function isn't implemented properly on windows yet.
+ import multiprocessing
NUM_PROCESSES = 4
DELAY_SECS = 0.25
@@ -231,6 +232,7 @@
done = time.time()
self.assertTrue(done - start < NUM_PROCESSES * DELAY_SECS)
self.assertEquals([output[1] for output in command_outputs], ["hello\n"] * NUM_PROCESSES)
+ self.assertEquals([], multiprocessing.active_children())
def main(platform, stdin, stdout, cmd, args):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes