Created
July 21, 2019 20:00
-
-
Save goutomroy/15f2d1191f7eb6ed2048f351fddfd30b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing import Pool | |
def f(x): | |
return x*x | |
if __name__ == '__main__': | |
p = Pool(5) | |
print(p.map(f, [1, 2, 3])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment