Advertisement
Guest User

Untitled

a guest
May 31st, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. from multiprocessing import Pool
  2. import random
  3.  
  4.  
  5. def get_random():
  6. random.randint(10, 100)
  7.  
  8.  
  9. def main():
  10. p = Pool(processes=4)
  11. p.map(get_random(), range(10))
  12. p.close()
  13. p.join()
  14. # get_random()
  15.  
  16. if __name__ == '__main__':
  17. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement