homepage

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 sbt
Recipients asksol, jafo, jnoller, nirai, sbt, ysj.ray
Date 2012年06月06日.14:12:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338991967.04.0.49417129819.issue10037@psf.upfronthosting.co.za>
In-reply-to
Content
It is not clear to me how to reproduce the bug.
When you say "letting the workers terminate themselves" do mean calling sys.exit() or os._exit() in the submitted task? Are you trying to get the result of a task which caused the worker to exit?
I'm not sure how the patch would change the current behaviour.
The following seems to work for me:
import sys, os
import multiprocessing as mp
if __name__ == '__main__':
 p = mp.Pool(4, maxtasksperchild=5)
 results = []
 for i in range(100):
 if i % 10 == 0:
 results.append(p.apply_async(sys.exit))
 else:
 results.append(p.apply_async(os.getpid))
 for i, res in enumerate(results):
 if i % 10 != 0:
 print(res.get())
 else:
 pass # trying res.get() would block forever
History
Date User Action Args
2012年06月06日 14:12:47sbtsetrecipients: + sbt, jafo, jnoller, nirai, asksol, ysj.ray
2012年06月06日 14:12:47sbtsetmessageid: <1338991967.04.0.49417129819.issue10037@psf.upfronthosting.co.za>
2012年06月06日 14:12:46sbtlinkissue10037 messages
2012年06月06日 14:12:45sbtcreate

AltStyle によって変換されたページ (->オリジナル) /