池创建了更多由arg传递的工作者

时间:2017-07-13 14:31:18

标签: python python-multiprocessing python-pool

以下说明应创建8个子进程+ 1个父进程

$ python3
Python 3.5.0 (default, Jun  7 2017, 16:34:33) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from multiprocessing import Pool
>>> pool = Pool(processes = 8)

但是当我使用监视工具检查python进程时,有12个进程 enter image description here

是的,我确信已经创建了这些流程,我运行了pool = Pool(processes = 8)

SO信息:

NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian

0 个答案:

没有答案