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 Michael.Hall
Recipients Michael.Hall
Date 2011年08月12日.00:25:40
SpamBayes Score 7.207938e-06
Marked as misclassified No
Message-id <1313108742.86.0.818410001029.issue12738@psf.upfronthosting.co.za>
In-reply-to
Content
I recently switched to Ubuntu 11.04 from OpenSUSE 11.4, and when I go to run a project I coded a couple days ago under OpenSUSE using the multiprocessing library, it hangs when it did not under OpenSUSE.
Specifically, I am using two queues, work_queue from which the children get jobs, and results_queue where they place their results before calling JoinableQueue.task_done() and grabbing the next result. I use the "poison pill" technique to terminate the children, where a None object is placed at the end of the queue for each child, and when they get one of the terminating objects they call task_done() again (to account for the None object) and exit.
In the main process, after spawning all of the children (one per physical CPU), it joins with the work_queue in order to wait for all of its children to finish.
This is pretty much a cookie-cutter multiprocessing implementation that I've used successfully for years under OpenSUSE, but for some odd reason the exact same code does not work under Ubuntu.
I would try porting to python 3.x, but the rest of my research team is still using 2.7, so that's not really an option right now.
History
Date User Action Args
2011年08月12日 00:25:42Michael.Hallsetrecipients: + Michael.Hall
2011年08月12日 00:25:42Michael.Hallsetmessageid: <1313108742.86.0.818410001029.issue12738@psf.upfronthosting.co.za>
2011年08月12日 00:25:42Michael.Halllinkissue12738 messages
2011年08月12日 00:25:40Michael.Hallcreate

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