Message139754
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 |
|
Date |
User |
Action |
Args |
2011-07-04 11:43:29 | lcampagn | set | recipients:
+ lcampagn |
2011-07-04 11:43:29 | lcampagn | set | messageid: <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za> |
2011-07-04 11:43:29 | lcampagn | link | issue12488 messages |
2011-07-04 11:43:28 | lcampagn | create | |
|