Reputation: 4766
For some reason, the following code blocks forever
read, write = multiprocessing.Pipe()
os.write(write.fileno(), b"test\n")
print(read.recv())
but this does not
read, write = multiprocessing.Pipe()
write.send("test\n")
print(read.recv())
As far as I can tell, multiprocessing.connection.Connection.send
just calls os.write
under the hood, so to my eye there should be no reason for this not to work. What's going on here?
Upvotes: 0
Views: 75