IPC with multiprocessing.connection

Andrew Berg bahamutzero8825 at gmail.com
Thu Dec 22 15:27:31 EST 2011


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



More information about the Python-list mailing list