billiard icon indicating copy to clipboard operation
billiard copied to clipboard

Pool not working at all

Open jamescasbon opened this issue 10 years ago • 1 comments

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?

jamescasbon avatar Nov 13 '14 01:11 jamescasbon

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

ask avatar Nov 13 '14 16:11 ask