Re: multiprocessing: child process share changes to global variable

2013-12-09 Thread Alan
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

Re: multiprocessing: child process share changes to global variable

2013-12-03 Thread Jason Friedman
> #--- 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

multiprocessing: child process share changes to global variable

2013-12-02 Thread Alan
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"