This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daniel.wagner-hall
Recipients daniel.wagner-hall
Date 2011-10-09.02:05:45
SpamBayes Score 4.5140237e-06
Marked as misclassified No
Message-id <1318125947.15.0.13973515193.issue13139@psf.upfronthosting.co.za>
In-reply-to
Content
import random

from multiprocessing import Pool
from time import sleep

def Process(x):
  try:
    print x
    sleep(random.random())
    raise Exception('Exception: ' + x)
  finally:
    print 'Finally: ' + x

Pool(3).map(Process, ['1','2','3'])

Expect all three Finally blocks to be called (or at least, one Finally per x printed by line 8)

Actually, only one (occasionally two) are printed.

Same behaviour exhibited on dual-core Mac running OSX 10.6 with Python 2.7, and single core Ubuntu running Python 2.6.
History
Date User Action Args
2011-10-09 02:05:47daniel.wagner-hallsetrecipients: + daniel.wagner-hall
2011-10-09 02:05:47daniel.wagner-hallsetmessageid: <1318125947.15.0.13973515193.issue13139@psf.upfronthosting.co.za>
2011-10-09 02:05:46daniel.wagner-halllinkissue13139 messages
2011-10-09 02:05:46daniel.wagner-hallcreate