I have python2.5 and multiprocessoring (get from http://code.google.com/p/python-multiprocessing/)
This simple code (get from docs), works very strange from time to time, sometimes it ok, but sometimes it throw timeout ex or hang my Windows (Vista), only reset helps :) Why this can happen?
from multiprocessing import Pool
def f(x):
print "fc",x
return x*x
pool = Pool(processes=4)
if __name__ == '__main__':
result = pool.apply_async(f, (10,)) # evaluate "f(10)" asynchronously
print result.get(timeout=3) # prints "100" unless your computer is *very* slow