Attributeerror occurs when Linux uses pool:__ exit__ Solutions

Source code:

with Pool(14) as p:
        p.map(merge_txt, task)

An error occurred:

solution:

pool = Pool(processes=14)
print(pool.map(merge_txt, task))
pool.terminate()

Read More: