Type/to search
1
Follow
0
Followers
python下无法使用进程池?
FAQ
Created 2018-04-13 10:21:31  Updated 2018-04-13 10:24:47
 0
 1913

def add(args):
(x,y) = args
return x+y

def main():
if __name__ == "__main__":
pool = Pool(2)
results = pool.map(add,[(1,2),(2,3),(3,4)])
Log("result",results)

这段代码总是提示无法pickle到add方法,有哪位大神能帮忙看看?或者提供一点能跑通的进程池范例也好

Related Recommendations
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)