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


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

IPC with multiprocessing.connection

Started byAndrew Berg <bahamutzero8825@gmail.com>
First post2011-12-22 14:27 -0600
Last post2011-12-23 06:27 -0600
Articles 3 — 2 participants

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


Contents

  IPC with multiprocessing.connection Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-22 14:27 -0600
    Re: IPC with multiprocessing.connection bobicanprogram <icanbob@gmail.com> - 2011-12-23 03:50 -0800
      Re: IPC with multiprocessing.connection Andrew Berg <bahamutzero8825@gmail.com> - 2011-12-23 06:27 -0600

#17748 — IPC with multiprocessing.connection

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-12-22 14:27 -0600
SubjectIPC with multiprocessing.connection
Message-ID<mailman.3993.1324585661.27778.python-list@python.org>
I'm trying to set up a system where my main program launches external
programs and then establishes connections to them via named pipes or
Unix domain sockets (depending on platform) with
multiprocessing.connection.Listener. The issue I'm having is with the
accept() method. If there is nothing on the other side of the
pipe/socket, it just hangs. Connection objects have a poll() method that
can timeout, but I see no way to continue the program if there's no
initial connection. What I'd like to do is let it time out if there's
nothing on the other side.
I'm pretty new to the multiprocessing module (and IPC in general), so I
could've easily missed something.

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640

[toc] | [next] | [standalone]


#17792

Frombobicanprogram <icanbob@gmail.com>
Date2011-12-23 03:50 -0800
Message-ID<c13ec164-f24f-476f-8a34-44491b6ad61e@p42g2000vbt.googlegroups.com>
In reply to#17748
On Dec 22, 3:27 pm, Andrew Berg <bahamutzero8...@gmail.com> wrote:
> I'm trying to set up a system where my main program launches external
> programs and then establishes connections to them via named pipes or
> Unix domain sockets (depending on platform) with
> multiprocessing.connection.Listener. The issue I'm having is with the
> accept() method. If there is nothing on the other side of the
> pipe/socket, it just hangs. Connection objects have a poll() method that
> can timeout, but I see no way to continue the program if there's no
> initial connection. What I'd like to do is let it time out if there's
> nothing on the other side.
> I'm pretty new to the multiprocessing module (and IPC in general), so I
> could've easily missed something.
>
> --
> CPython 3.2.2 | Windows NT 6.1.7601.17640

You might want to check out the code samples at:
http://www.icanprogram.com/06py/lesson1/lesson1.html

bob

[toc] | [prev] | [next] | [standalone]


#17796

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-12-23 06:27 -0600
Message-ID<mailman.4027.1324643243.27778.python-list@python.org>
In reply to#17792
On 12/23/2011 5:50 AM, bobicanprogram wrote:
> You might want to check out the code samples at:
> http://www.icanprogram.com/06py/lesson1/lesson1.html
Let's see, I asked about a method in the multiprocessing module, and you 
recommend code snippets that run on Python versions that don't even have 
the module and that assume Linux when I state in my email signature the 
version of /Windows/ that I run. On top of all that, it's not even 
designed to teach Python; it's designed to explain how to use that 
library! I honestly don't mind someone pushing their website if it 
actually might help, but you clearly didn't read my post.

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640

[toc] | [prev] | [standalone]


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


csiph-web