from multiprocessing.dummy import Pool
lists = [i for i in range(1, 1000000001)]
def func(i):
print(i + 1)
pool = Pool(processes=8)
pool.map(func, lists)
pool.close()
pool.join()
from multiprocessing.dummy import Pool
lists = [i for i in range(1, 1000000001)]
def func(i):
print(i + 1)
pool = Pool(processes=8)
pool.map(func, lists)
pool.close()
pool.join()