python多进程,并获取每个进程的返回值
pool = multiprocessing.Pool(processes=10) row = [...] for row in rows: task_id = row[1] img_id = row[0] pool.apply_async(check_picture_contain_human_or_dog, (task_id, img_id)) pool.close() pool.join()
pool = multiprocessing.Pool(processes=10) row = [...] for row in rows: task_id = row[1] img_id = row[0] pool.apply_async(check_picture_contain_human_or_dog, (task_id, img_id)) pool.close() pool.join()