agronholm / agronholm/pythonfutures

[Errno 32] Broken pipe When Mapping Too Many Values

Ouverte
#47 6 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
awaiting input
Langage dominant
Python
Étoiles
236
Forks
46
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.