对比一下,看有什么不同 from multiprocessing import Pool def f(a): print '============' return 'ok' if __name__ == '__main__': pool = Pool() a = range(3) print pool.map(f, a) pool.close() pool.join()
from multiprocessing import Pool def f(a): print '============' return 'ok' if __name__ == '__main__': pool = Pool() a = range(3) print pool.map(f, a) pool.close() pool.join()
[quote=引用 2 楼 liu6539152的回复:][quote=引用 1 楼 AnonymousRookie 的回复:] 对比一下,看有什么不同 from multiprocessing import Pool def f(a): print '============' return 'ok' if __name__ == '__main__': pool = Pool() a = range(3) print pool.map(f, a) pool.close() pool.join()
[quote=引用 1 楼 AnonymousRookie 的回复:] 对比一下,看有什么不同 from multiprocessing import Pool def f(a): print '============' return 'ok' if __name__ == '__main__': pool = Pool() a = range(3) print pool.map(f, a) pool.close() pool.join()
37,719
社区成员
34,239
社区内容
加载中
试试用AI创作助手写篇文章吧