Shutdown multiprocess pool after running tests to avoid _finalizer spew on Windows

Can't just let the GC collect the pool on Windows.

R=tandrii@chromium.org
BUG=618726

Review-Url: https://codereview.chromium.org/2296723006
changes/18/399118/1
scottmg 9 years ago committed by Commit bot
parent 6911b06750
commit 86099d7ce5

@ -563,6 +563,11 @@ class InputApi(object):
msgs.extend(map(CallCommand, tests))
return [m for m in msgs if m]
def ShutdownPool(self):
self._run_tests_pool.close()
self._run_tests_pool.join()
self._run_tests_pool = None
class _DiffCache(object):
"""Caches diffs retrieved from a particular SCM."""
@ -1448,6 +1453,8 @@ class PresubmitExecuter(object):
else:
result = () # no error since the script doesn't care about current event.
input_api.ShutdownPool()
# Return the process to the original working directory.
os.chdir(main_path)
return result

@ -1253,6 +1253,7 @@ class InputApiUnittest(PresubmitTestsBase):
'ReadFile',
'RightHandSideLines',
'ServerPaths',
'ShutdownPool',
'basename',
'cPickle',
'cpplint',

Loading…
Cancel
Save