celery / billiard

Multiprocessing Pool Extensions
Other
406 stars 248 forks source link

Pool not working at all #128

Open jamescasbon opened 9 years ago

jamescasbon commented 9 years ago

I have billiard installed on arch for python2 and 3:

community/python-billiard 3.3.0.18-2 [installed]
    Python multiprocessing fork with improvements and bugfixes.
community/python2-billiard 3.3.0.18-2 [installed]
    Python multiprocessing fork with improvements and bugfixes.

I am trying to run the following trivial example:

$ cat dh.py
def square(x):
    return x * x

$ cat run.py
from __future__ import print_function
import billiard
p = billiard.Pool(2)
from dh import square
print('hi')
print(p.map(square, [2,3]))
print('crashing so hard you wont see me')

python 2

$ python2 --version
Python 2.7.8

$ python2 run.py
hi

$ echo $?
1

python 3

$ python --version
Python 3.4.2

$ python run.py
hi

$ echo $?
1

tracing the process reveals a child calls exit_group(1). Is this supposed to work?

ask commented 9 years ago

celery doesn't use the map method so we don't have focus on that (and multiprocessing doesn't have any unit tests sadly). I think this is fixed in the 3.3 branch