This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Unsupported provider

Author Jimbofbx
Recipients Jimbofbx, asksol, dragonfyre13, dsvensson, gsson, jnoller, jodal
Date 2012-04-06.22:19:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333750761.87.0.60812760193.issue4892@psf.upfronthosting.co.za>
In-reply-to
Content
This is an issue for me (Python 3.2). I have a custom pool that sends arguments for a function call over a pipe. I cannot send another pipe as an argument. 

Tim's workaround also does not work for me (win xp 32bit and 64bit)

From what I can tell, you can only send a connection as a direct argument to a function call. This limits what I can do because I cannot introduce new pipes to a worker process after it is instantiated.

Using this code:

def main():
    from multiprocessing import Pipe, reduction
    i, o = Pipe()
    print(i);
    reduced = reduction.reduce_connection(i)
    print(reduced);
    newi = reduced[0](*reduced[1])
    print(newi);
    newi.send("hi")
    o.recv()

if __name__ == "__main__":
    main();

This is my output:

<read-write PipeConnection, handle 1760>
(<function rebuild_connection at 0x00FD4C00>, (('\\\\.\\pipe\\pyc-3156-1-q5wwnr', 1756, False), True, True))
<read-write Connection, handle 1720>
Traceback (most recent call last):
  File "H:\mti\secure\Flash\Reliability\Perl_Rel\Ambyx\James\bugs\test.py", line 47, in <module>
    main();
  File "H:\mti\secure\Flash\Reliability\Perl_Rel\Ambyx\James\bugs\test.py", line 43, in main
    newi.send("hi")
IOError: [Errno 10038] An operation was attempted on something that is not a socket

As you can see, the handle changes
History
Date User Action Args
2012-04-07 17:52:53pitrouunlinkissue4892 messages
2012-04-06 22:19:21Jimbofbxsetrecipients: + Jimbofbx, jnoller, gsson, dsvensson, asksol, jodal, dragonfyre13
2012-04-06 22:19:21Jimbofbxsetmessageid: <1333750761.87.0.60812760193.issue4892@psf.upfronthosting.co.za>
2012-04-06 22:19:21Jimbofbxlinkissue4892 messages
2012-04-06 22:19:21Jimbofbxcreate