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


Groups > comp.lang.python > #25657

Re: Let child process to run while parent is out (multiprocessing)

References <CACCLA54K9HV1qPhuT2i_dSjUk+ey3TdFN2+9x8_3Aay7de3Snw@mail.gmail.com>
Date 2012-07-20 09:05 +1000
Subject Re: Let child process to run while parent is out (multiprocessing)
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2322.1342739114.4697.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jul 20, 2012 at 6:34 AM, John Wong <gokoproject@gmail.com> wrote:
> Here is output:
> yeukhon@fermat:~$ python c2.py
> abcd12345
> done  [now hangs for 10 seconds]
> I build things

Side point: I just tried your code on Python 2.6 on Windows, and it
produced all three lines of output before waiting the ten seconds.
Same in Python 3.3 on Linux (after putting parentheses around the
prints, the only 2->3 change needed). Your experience of it delaying
the "building" message probably has something to do with output
buffering.

As to the fundamental, though: I don't know that Python truly supports
what you're trying to do. A skim of the docs doesn't show up anything
obvious, so I'm hoping that someone else has already tried this and
can give an authoritative or empirical answer.

ChrisA

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


Thread

Re: Let child process to run while parent is out (multiprocessing) Chris Angelico <rosuav@gmail.com> - 2012-07-20 09:05 +1000

csiph-web