Pass data to a subprocess

andrea crotti andrea.crotti.0 at gmail.com
Tue Jul 31 10:12:22 EDT 2012


>
>
> def procs():
>     mp = MyProcess()
>     # with the join we are actually waiting for the end of the running time
>     mp.add([1,2,3])
>     mp.start()
>     mp.add([2,3,4])
>     mp.join()
>     print(mp)
>

I think I got it now, if I already just mix the start before another
add, inside the Process.run it won't see the new data that has been
added after the start.

So this way is perfectly safe only until the process is launched, if
it's running I need to use some multiprocess-aware data structure, is
that correct?



More information about the Python-list mailing list