working example of multiprocessing.Queue

一笑奈何 提交于 2019-12-10 17:29:08

问题


I am looking for a working example of multiprocessing.Queue after being pointed to it from this question: Python utilizing multiple processors

I came across this, but it only seems to use one of my 12 processors even when I change num_processes=12. I also changed num_jobs = 200000 so that it wouldn't complete so fast.

Can someone tell me what's wrong with that example or point me to one that works?


回答1:


There are examples in the Python docs.

Do these examples work? If not, it may be that the problem itself is not Python, but something else instead.



来源:https://stackoverflow.com/questions/5082391/working-example-of-multiprocessing-queue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!