『Python』多进程

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去索引()的元素就行了

原文地址:https://www.cnblogs.com/hellcat/p/14850458.html