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


Groups > comp.lang.python > #28639

Re: Looking for an IPC solution

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '__name__': 0.07; '"if': 0.09; 'closest': 0.09; 'fork': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sep': 0.09; 'sockets': 0.09; 'windows,': 0.09; 'wraps': 0.09; 'library': 0.15; 'applies': 0.15; 'mmap': 0.16; 'processes.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'scratch': 0.16; 'subprocess': 0.16; 'module,': 0.17; 'thu,': 0.17; 'creates': 0.18; 'memory': 0.18; '(or': 0.18; 'import': 0.21; 'statement': 0.23; 'feature': 0.24; 'common': 0.26; 'possibly': 0.27; 'header:X-Complaints-To:1': 0.28; 'run': 0.28; 'pickle': 0.29; 'starts': 0.29; 'probably': 0.29; 'code': 0.31; 'system,': 0.32; 'file': 0.32; '+0200,': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'themselves': 0.33; 'received:org': 0.36; 'but': 0.36; 'charset:us-ascii': 0.36; 'execute': 0.37; 'uses': 0.37; 'why': 0.37; 'communicate': 0.37; 'virtual': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'between': 0.63; 'different': 0.63; 'managing': 0.64; 'gelonida': 0.84; 'windows)': 0.84; 'dennis': 0.91; 'received:108': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Looking for an IPC solution
Date Thu, 06 Sep 2012 16:33:22 -0400
Organization > Bestiaria Support Staff <
References <50410AD6.7080003@shopzeus.com> <loom.20120831T230411-646@post.gmane.org> <k29q3g$90m$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-108-79-223-184.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 3.3/32.846
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.327.1346963609.27098.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1346963609 news.xs4all.nl 6976 [2001:888:2000:d::a6]:33922
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:28639

Show key headers only | View raw


On Thu, 06 Sep 2012 11:23:59 +0200, Gelonida N <gelonida@gmail.com>
declaimed the following in gmane.comp.python.general:

> 
> My understanding was, that it forks (or whateveri is closest to fork 
> under windows) and uses sockets and pickle to communicate between the 
> processes.
>
	In Windows, it starts a whole new program/process image from scratch
-- which is why you MUST use the "if __name__ ==..." system, since the
subprocess to run has to import the entire module, and you DON'T want it
to execute the code the creates a subprocess recursively. Whereas a
"fork" OS would have the subprocess starting with the statement
following the creation logic.

	Note that this difference mainly applies to how the processes are
themselves are created... How the library wraps shared data is possibly
different (I've never understood how a "fork" process can avoid memory
conflicts if it has write access to common virtual memory blocks).

mmap is probably the closest shared memory feature available from
Python, but managing the memory file contents is not the simplest.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Re: Looking for an IPC solution Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-06 16:33 -0400

csiph-web