I received a suggestion off list that my results indicated that the jobs were
not being distributed across the pool workers. I used
mp.current_process().name to confirm this suggestion.
Alan Isaac
--
https://mail.python.org/mailman/listinfo/python-list
> #--- temp.py -
> #run at Python 2.7 command prompt
> import time
> import multiprocessing as mp
> lst = []
> lstlst = []
>
> def alist(x):
> lst.append(x)
> lstlst.append(lst)
> print "a"
> return lst
>
> if __name__=='__main__':
> pool = mp
In the code below, child processes see changes to global variables caused by
other child processes. That is, pool.map is producing a list where the value of
``lst`` is being (non-deterministically) shared across child processes.
Standard advice is that, "Processes have independent memory space"