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


Groups > comp.lang.python > #9582 > unrolled thread

Re: Python threading/multiprocessing issue.

Started byChris Angelico <rosuav@gmail.com>
First post2011-07-16 09:34 +1000
Last post2011-07-16 09:34 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python threading/multiprocessing issue. Chris Angelico <rosuav@gmail.com> - 2011-07-16 09:34 +1000

#9582 — Re: Python threading/multiprocessing issue.

FromChris Angelico <rosuav@gmail.com>
Date2011-07-16 09:34 +1000
SubjectRe: Python threading/multiprocessing issue.
Message-ID<mailman.1089.1310772884.1164.python-list@python.org>
2011/7/16 Lee Harr <missive@hotmail.com>:
> I am not a multiprocessing expert, but I think the problem you
> are having is that Process is running your code in a separate
> process, so there is no way you could see those object changes
> in your main line code.
>
> In other words, Process is not an exact replacement for Thread.
>

That's correct; inter-process communication is the realm of sockets
(network or Unix), pipes, signals, etc - but inter-thread
communication is a matter of making sure you don't tread on each
other's toes. In CPython, the latter is guaranteed by the GIL; the
specific advantage of multiprocessing over threading is that each
process has a separate GIL, and that's because all variables are
separate.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web