https://docs.python.org/3/library/multiprocessing.html?highlight=imap_unordered#multiprocessing.pool.Pool.imap_unordered

注意,worker函数不能写在其他函数内部:

def fun1():

    def worker():

        pass

多个参数时直接用[(),()]传实际会将()传给worker的首个参数,所以worker接收argv,在worker内用0~n去索引()的元素就行了

相关文章:

  • 2021-11-26
  • 2022-02-01
  • 2021-12-05
猜你喜欢
  • 2022-03-03
  • 2021-07-26
  • 2021-07-16
  • 2021-12-08
相关资源
相似解决方案