Pass data to a subprocess
andrea.crotti.0 at gmail.com
Tue Jul 31 15:56:37 CEST 2012
I'm having fun in the world of multiprocessing, and I would like some
For example suppose I want to create many processes and pass them some
data to process (also why they are running).
I found many nice things (Pipe, Manager and so on), but actually even
this seems to work:
self.ls = 
def add(self, ls):
self.ls += ls
print("running the process in another subprocess")
mp = MyProcess()
# with the join we are actually waiting for the end of the running time
Which is a bit surprising, because it means that I can pass data to an
object that is running on another process.
Is it because of some magic in the background and can I rely on that or
simply I didn't understand how it works?
More information about the Python-list