Re: Looking for an IPC solution

Discussion in 'Python' started by Dennis Lee Bieber, Sep 6, 2012.

  1. On Thu, 06 Sep 2012 11:23:59 +0200, Gelonida N <>
    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
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Sep 6, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy

    Looking for an IPC solution

    Laszlo Nagy, Aug 31, 2012, in forum: Python
    Replies:
    10
    Views:
    347
    Laszlo Nagy
    Sep 6, 2012
  2. Antoine Pitrou

    Re: Looking for an IPC solution

    Antoine Pitrou, Aug 31, 2012, in forum: Python
    Replies:
    0
    Views:
    161
    Antoine Pitrou
    Aug 31, 2012
  3. Jean-Michel Pichavant

    Re: Looking for an IPC solution

    Jean-Michel Pichavant, Sep 3, 2012, in forum: Python
    Replies:
    0
    Views:
    178
    Jean-Michel Pichavant
    Sep 3, 2012
  4. Gelonida N

    Re: Looking for an IPC solution

    Gelonida N, Sep 6, 2012, in forum: Python
    Replies:
    0
    Views:
    152
    Gelonida N
    Sep 6, 2012
  5. Gelonida N

    Re: Looking for an IPC solution

    Gelonida N, Sep 6, 2012, in forum: Python
    Replies:
    0
    Views:
    159
    Gelonida N
    Sep 6, 2012
Loading...

Share This Page