Skip to content

Instantly share code, notes, and snippets.

@TheLoneNut
Created April 29, 2021 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheLoneNut/7d2c66abb52dee1aa4ecbe6ee93a9a63 to your computer and use it in GitHub Desktop.
Save TheLoneNut/7d2c66abb52dee1aa4ecbe6ee93a9a63 to your computer and use it in GitHub Desktop.
def my_list_processing(l):
if 666 in l: return 666/0
return sum(l)
elements = [i for i in range(1000)]
results = []
def reducing(e):
results.append(e)
protectedMultiprocessing(elements, my_list_processing, reducing, verbose=True)
print(results)
result = sum(results)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment