Skip to content

Instantly share code, notes, and snippets.

@sanfx
Created August 10, 2014 06:41
Show Gist options
  • Save sanfx/14ba658d61da8c2ee498 to your computer and use it in GitHub Desktop.
Save sanfx/14ba658d61da8c2ee498 to your computer and use it in GitHub Desktop.
from multiprocessing import Pool
def calculate(number):
return number
if __name__ == '__main__':
pool = Pool()
result = pool.map(calculate, range(4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment