Skip to content Skip to sidebar Skip to footer

Why Cannot I Poll() On A Multiprocessing.connection Object On Windows?

Using multiprocessing.Pipe I create two multiprocessing.Connection objects, for one of which I read the file descriptor/handle through Conection.fileno() and then pass it as a comm

Solution 1:

Turns out the issue was not specific to poll, but with all Connection methods interacting with the underlaying handle (recv, send).

Because multiprocessing.Pipe creates a named pipe in windows, combined with how pipe handle inheritance works in python2 (which once identified as the root cause shown to be discussedprettyheavily) passing on an handle seems to be very difficult if not impossible.

Going over multiprocessing's documentation again, I noticed the Listener and Client interfaces which worked well for me, passing along whatever was in the Listener.address attribute to Clients constructor.

Post a Comment for "Why Cannot I Poll() On A Multiprocessing.connection Object On Windows?"