Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # fully commit cores with python
- import multiprocessing as mp
- def worker(val):
- x = 2
- for _ in range(1000000):
- x += 2
- with mp.Pool(mp.cpu_count()) as pool:
- pool.map(worker, range(10000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement