I am running the following code in iPython:
import multiprocessing
def my_function(x):
"""The function you want to compute in parallel."""
x += 1
return x
if __name__ == '__main__':
pool = multiprocessing.Pool()
results = pool.map(my_function, [1,2,3,4,5,6])
print(results)
in ipython QT console on Windows. However, the code does not work -- the QT console just freezes up. The issue is specific to iPython (the code above should work for the regular Python 2.7).
Any solution to this?