Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #72530

Re: multiprocess (and paramiko)

References <3c0be3a7-9d2d-4530-958b-13be97db3765@googlegroups.com>
Date 2014-06-04 02:08 +1000
Subject Re: multiprocess (and paramiko)
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.10632.1401811721.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Jun 4, 2014 at 1:43 AM, mennis <michaelian.ennis@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

multiprocess (and paramiko) mennis <michaelian.ennis@gmail.com> - 2014-06-03 08:43 -0700
  Re: multiprocess (and paramiko) Chris Angelico <rosuav@gmail.com> - 2014-06-04 02:08 +1000
  Re: multiprocess (and paramiko) Roy Smith <roy@panix.com> - 2014-06-03 12:43 -0400
    Re: multiprocess (and paramiko) mennis <michaelian.ennis@gmail.com> - 2014-06-03 11:29 -0700

csiph-web