multiprocessing.Queue的工作示例 [英] working example of multiprocessing.Queue

查看:110
本文介绍了multiprocessing.Queue的工作示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在从以下问题指向它之后,我正在寻找multiprocessing.Queue的工作示例: Python利用多个处理器

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

我遇到了,但是它似乎只使用了我的12个处理器之一,即使我更改num_processes=12.我还更改了num_jobs = 200000,使其无法很快完成.

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?

推荐答案

在Python中有文档.

这些示例有用吗?如果不是,则可能是问题本身不是Python,而是其他问题.

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

这篇关于multiprocessing.Queue的工作示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆