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.

Author lcampagn
Recipients lcampagn
Date 2011-07-04.11:43:28
SpamBayes Score 1.7458236e-06
Marked as misclassified No
Message-id <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za>
In-reply-to
Content
I have found that when using multiprocessing.Connection objects to pass data between two processes, closing one end of the pipe is not properly communicated to the other end. My expectation was that when calling recv() on the remote end, it should raise EOFError if the pipe has been closed. Instead, the remote recv() blocks indefinitely. This behavior exists on Linux and Cygwin, but NOT on native Windows.

Example:

    import multiprocessing as m

    def fn(pipe):
        print "recv:", pipe.recv()
        print "recv:", pipe.recv()

    if __name__ == '__main__':
        p1, p2 = m.Pipe()
        pr = m.Process(target=fn, args=(p2,))
        pr.start()
        p1.send(1)
        p1.close()  ## should generate EOFError in remote process
History
Date User Action Args
2011-07-04 11:43:29lcampagnsetrecipients: + lcampagn
2011-07-04 11:43:29lcampagnsetmessageid: <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za>
2011-07-04 11:43:29lcampagnlinkissue12488 messages
2011-07-04 11:43:28lcampagncreate