Re: multiprocessing module - isn't it a bug?

2009-03-14 Thread Christian Heimes
dmitrey wrote: > This doesn't work for > costlyFunction2 = lambda x: 11 > as well; and it doesn't work for imap, apply_async as well (same > error). > So, isn't it a bug, or it can be somehow fixed? > Thank you in advance, D. It's not a bug but a limitation of the pickle protocol. Pickle can't han

Re: multiprocessing module - isn't it a bug?

2009-03-14 Thread Terry Reedy
dmitrey wrote: # THIS WORKS OK from multiprocessing import Pool N = 400 K = 800 processes = 2 def costlyFunction2(z): r = 0 for k in xrange(1, K+2): r += z ** (1 / k**1.5) return r class ABC: def __init__(self): pass def testParallel(self): po = Pool(processe

multiprocessing module - isn't it a bug?

2009-03-14 Thread dmitrey
# THIS WORKS OK from multiprocessing import Pool N = 400 K = 800 processes = 2 def costlyFunction2(z): r = 0 for k in xrange(1, K+2): r += z ** (1 / k**1.5) return r class ABC: def __init__(self): pass def testParallel(self): po = Pool(processes=processes)