multiprocess (and paramiko)

Chris Angelico rosuav at gmail.com
Tue Jun 3 12:08:38 EDT 2014


On Wed, Jun 4, 2014 at 1:43 AM, mennis <michaelian.ennis at gmail.com> wrote:
> I was able to work around this by using a completely different design but I still don''t understand why this doesn't work.  It appears that the process that launches the process doesn't get access to updated object attributes.  When I set and check them in the object itself it behaves as expected.  When I check them from outside the object instance I get the initial values only.  Could someone explain what I'm missing?
>

When you fork into two processes, the child gets a copy of the
parent's state, but after that, changes happen completely
independently. You need to use actual multiprocessing features like
Queue and such to pass information from one process to another.

ChrisA



More information about the Python-list mailing list