Skip to content

Instantly share code, notes, and snippets.

@cuihaoleo
Created August 31, 2015 03:23
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 cuihaoleo/a311de2dcbffa401fe3a to your computer and use it in GitHub Desktop.
Save cuihaoleo/a311de2dcbffa401fe3a to your computer and use it in GitHub Desktop.
mptest.py
import concurrent.futures
with concurrent.futures.ProcessPoolExecutor() as executor:
for ans in executor.map(lambda x: 2**x, range(10)):
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment