uqfoundation / pathos

parallel graph management and execution in heterogeneous computing
http://pathos.rtfd.io
Other
1.38k stars 89 forks source link

when run the following code in anaconda prompt its going into a infinite loop.how can i fix it? #194

Closed chaitu01 closed 1 year ago

chaitu01 commented 4 years ago
import multiprocessing as mp
from pathos.multiprocessing import ProcessingPool as Pool
class c():
    def x(self):
        global r
        def r(y):
            return y
        pool = Pool().map
        n=pool(r, [2,2,3,45])
        print(n)
z=c()
z.x()
mmckerns commented 1 year ago

I'm unable to reproduce an "infinite loop" on any versions of python and pathos, using current dependencies, on MacOS or linux. I didn't test windows. I tested in both in a file run from the condo prompt and in a python interpreter session.

Sorry for the long time with no reply. Please reopen if you are still having an issue.