Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import multiprocessing
- def calculate(x):
- # here is where I would take this input x (and maybe a couple more inputs)
- # and build a larger library of variables that I use further down the line
- def domath(y):
- return x * y
- pool = multiprocessing.Pool(3)
- final= pool.map(domath, range(3))
- calculate(2)
- Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement