I am new to multiprocessing. i wrote a simple code that takes 1 number at a time and print it.
import multiprocessing as mp
def test(num):
print num
L = [1,2,3,4,5,6,7,8]
pool = mp.Pool(2)
pool.map(test,L)
this can be done using normal method also [test(i) for i in L]
But i want to use multiprocessing and do this. But when i am running the program, the kernal shows busy, but no prints are happening.
Is there something wrong in my code?