mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Remove obsolete XXX comment about non-blocking I/O
The comment suggested rewriting Popen._communicate() to use non-blocking I/O on file objects now that Python 3's io module is used instead of C stdio. This is unnecessary - the current approach using select() to detect ready fds followed by os.read()/os.write() is correct and efficient. The selector already solves "when is data ready?" so non-blocking mode would add complexity with no benefit. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a3e98a73be
commit
3c28ed6e93
1 changed files with 0 additions and 3 deletions
|
|
@ -2655,9 +2655,6 @@ def _communicate(self, input, endtime, orig_timeout):
|
||||||
ready = selector.select(timeout)
|
ready = selector.select(timeout)
|
||||||
self._check_timeout(endtime, orig_timeout, stdout, stderr)
|
self._check_timeout(endtime, orig_timeout, stdout, stderr)
|
||||||
|
|
||||||
# XXX Rewrite these to use non-blocking I/O on the file
|
|
||||||
# objects; they are no longer using C stdio!
|
|
||||||
|
|
||||||
for key, events in ready:
|
for key, events in ready:
|
||||||
if key.fileobj is self.stdin:
|
if key.fileobj is self.stdin:
|
||||||
chunk = input_view[self._input_offset :
|
chunk = input_view[self._input_offset :
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue