agronholm / agronholm/pythonfutures

[Errno 32] Broken pipe When Mapping Too Many Values

未关闭
#47 6 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
awaiting input
主要语言
Python
星标
236
派生
46
PR 合并指标
30 天内没有已合并 PR

描述

First of all, thanks for that great backport. I am using it for the xfork package to support the 2.7 branch.

Unfortunately, there is something strange happening with this futures distribution which works perfectly fine with python3.4

```
from concurrent.futures import ProcessPoolExecutor

def calc(n):
with ProcessPoolExecutor() as pool:
results = pool.map(term, range(n))
return sum(results)

def term(x):
return x

print(calc(5000))
```

```
/usr/bin/python2.7 calc.py
12497500
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/queues.py", line 266, in _feed
send(obj)
IOError: [Errno 32] Broken pipe
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。