Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from multiprocessing.pool import Pool
import os
def process_one_file(filename):
print("processing ", filename)
return filename
pool = Pool(4)
p = pool.imap_unordered(process_one_file, os.listdir(), chunksize=10000)
print('processed: ', list(p))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.