Message84204
Python 2.6.1 (r261:67515, Mar 22 2009, 05:39:39)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from multiprocessing import Pipe
>>> parent, child = Pipe()
>>> parent.send(1)
>>> parent.close()
>>> print child.recv()
1
>>> print child.poll()
True
>>> print child.recv()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
EOFError
We have to use both poll() and recv() to determine whether or not the
connection was actually closed.
Better behavior might be returning True on poll() only if the next
recv() on that end of the pipe will work without an error. There may not
be a way to guarantee this, but it would be useful if the documentation
was clarified either way.
uname -a:
Linux mememy 2.6.24-23-generic #1 SMP Thu Feb 5 15:00:25 UTC 2009 i686
GNU/Linux
Compiled Python 2.6.1 from source. |
|
Date |
User |
Action |
Args |
2009-03-26 19:38:33 | mallyvai | set | recipients:
+ mallyvai, georg.brandl |
2009-03-26 19:38:32 | mallyvai | set | messageid: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> |
2009-03-26 19:38:31 | mallyvai | link | issue5573 messages |
2009-03-26 19:38:30 | mallyvai | create | |
|