IPC with multiprocessing.connection

A

Andrew Berg

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.
 
B

bobicanprogram

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.

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

bob
 
A

Andrew Berg

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top