[Python-checkins] cpython: Increase timeout used when waiting for manager to shutdown cleanly
richard.oudkerk
python-checkins at python.org
Fri Jun 15 21:13:52 CEST 2012
http://hg.python.org/cpython/rev/831ae71d0bdc
changeset: 77447:831ae71d0bdc
user: Richard Oudkerk <shibturn at gmail.com>
date: Fri Jun 15 20:08:29 2012 +0100
summary:
Increase timeout used when waiting for manager to shutdown cleanly
before resorting to terminate()
files:
Lib/multiprocessing/managers.py | 2 +-
Lib/test/test_multiprocessing.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -582,7 +582,7 @@
except Exception:
pass
- process.join(timeout=0.2)
+ process.join(timeout=1.0)
if process.is_alive():
util.info('manager still alive')
if hasattr(process, 'terminate'):
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -1820,6 +1820,11 @@
# run after all the other tests for the manager. It tests that
# there have been no "reference leaks" for the manager's shared
# objects. Note the comment in _TestPool.test_terminate().
+
+ # If some other test using ManagerMixin.manager fails, then the
+ # raised exception may keep alive a frame which holds a reference
+ # to a managed object. This will cause test_number_of_objects to
+ # also fail.
ALLOWED_TYPES = ('manager',)
def test_number_of_objects(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list