最佳答案
在Pythonmultiprocessing
库中,是否有pool.map
的变体支持多个参数?
import multiprocessing
text = "test"
def harvester(text, case):X = case[0]text + str(X)
if __name__ == '__main__':pool = multiprocessing.Pool(processes=6)case = RAW_DATASETpool.map(harvester(text, case), case, 1)pool.close()pool.join()