[Python-checkins] r78790 - python/trunk/Lib/multiprocessing/pool.py
florent.xicluna
python-checkins at python.org
Mon Mar 8 12:01:39 CET 2010
Author: florent.xicluna
Date: Mon Mar 8 12:01:39 2010
New Revision: 78790
Log:
On finalize, don't try to join not started process.
Modified:
python/trunk/Lib/multiprocessing/pool.py
Modified: python/trunk/Lib/multiprocessing/pool.py
==============================================================================
--- python/trunk/Lib/multiprocessing/pool.py (original)
+++ python/trunk/Lib/multiprocessing/pool.py Mon Mar 8 12:01:39 2010
@@ -447,12 +447,10 @@
if pool and hasattr(pool[0], 'terminate'):
debug('joining pool workers')
for p in pool:
- p.join()
- for w in pool:
- if w.exitcode is None:
+ if p.is_alive():
# worker has not yet exited
- debug('cleaning up worker %s' % w.pid)
- w.join()
+ debug('cleaning up worker %d' % p.pid)
+ p.join()
#
# Class whose instances are returned by `Pool.apply_async()`
More information about the Python-checkins
mailing list