diff --git a/tornado/iostream.py b/tornado/iostream.py
index 89d87a56..4b448039 100644
--- a/tornado/iostream.py
+++ b/tornado/iostream.py
@@ -599,6 +599,15 @@ class BaseIOStream(object):
             if self._read_until_close:
                 self._read_until_close = False
                 self._finish_read(self._read_buffer_size, False)
+            elif self._read_future is not None:
+                # resolve reads that are pending and ready to complete
+                try:
+                    pos = self._find_read_pos()
+                except UnsatisfiableReadError:
+                    pass
+                else:
+                    if pos is not None:
+                        self._read_from_buffer(pos)
             if self._state is not None:
                 self.io_loop.remove_handler(self.fileno())
                 self._state = None
@@ -784,8 +793,25 @@ class BaseIOStream(object):
             self._read_from_buffer(pos)
 
     def _start_read(self) -> Future:
-        self._check_closed()  # Before reading, check that stream is not closed.
-        assert self._read_future is None, "Already reading"
+        if self._read_future is not None:
+            # It is an error to start a read while a prior read is unresolved.
+            # However, if the prior read is unresolved because the stream was
+            # closed without satisfying it, it's better to raise
+            # StreamClosedError instead of AssertionError. In particular, this
+            # situation occurs in harmless situations in http1connection.py and
+            # an AssertionError would be logged noisily.
+            #
+            # On the other hand, it is legal to start a new read while the
+            # stream is closed, in case the read can be satisfied from the
+            # read buffer. So we only want to check the closed status of the
+            # stream if we need to decide what kind of error to raise for
+            # "already reading".
+            #
+            # These conditions have proven difficult to test; we have no
+            # unittests that reliably verify this behavior so be careful
+            # when making changes here. See #2651 and #2719.
+            self._check_closed()
+            assert self._read_future is None, "Already reading"
         self._read_future = Future()
         return self._read_future
 

IOStream read can fail if closed with an open read buffer
I'm currently investigating the issue mentioned [here](https://github.com/tornadoweb/tornado/issues/2651#issuecomment-515687031) and I've narrowed the situation down somewhat:

SimpleAsyncHTTPRequest is making a POST request with an empty body to a server that is responding *very* quickly. In this case, it is the request to github.com to complete GitHub OAuth.

When `read_until_regex` is called in 
- read buffer is not empty, but
- stream is closed

So a closed check is apparently occurring before the read is attempted from the existing buffer. Interestingly, #2670 introduces exactly such a premature closed check (a `_try_inline_read()` would succeed if attempted), but the issue still occurs in 6.0.2, prior to #2670, so there must be an *additional* check that's causing StreamClosedError to be raised even when the 

I'm trying to provoke this with a self-contained test case that doesn't require github credentials, but haven't managed it yet. Will report back when I do.

Using curl_httpclient does not appear to exhibit this behavior.

I think this is related to #2651 in that it's another issue in 6.0 where there are races between the closed state and pending reads/writes.
diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py
index 359269ca..7e400c75 100644
--- a/tornado/test/iostream_test.py
+++ b/tornado/test/iostream_test.py
@@ -23,6 +23,7 @@ from tornado.testing import (
 )
 from tornado.test.util import skipIfNonUnix, refusing_port, skipPypy3V58
 from tornado.web import RequestHandler, Application
+import asyncio
 import errno
 import hashlib
 import logging
@@ -166,6 +167,27 @@ class TestReadWriteMixin(object):
     def make_iostream_pair(self, **kwargs):
         raise NotImplementedError
 
+    def iostream_pair(self, **kwargs):
+        """Like make_iostream_pair, but called by ``async with``.
+
+        In py37 this becomes simpler with contextlib.asynccontextmanager.
+        """
+
+        class IOStreamPairContext:
+            def __init__(self, test, kwargs):
+                self.test = test
+                self.kwargs = kwargs
+
+            async def __aenter__(self):
+                self.pair = await self.test.make_iostream_pair(**self.kwargs)
+                return self.pair
+
+            async def __aexit__(self, typ, value, tb):
+                for s in self.pair:
+                    s.close()
+
+        return IOStreamPairContext(self, kwargs)
+
     @gen_test
     def test_write_zero_bytes(self):
         # Attempting to write zero bytes should run the callback without
@@ -261,6 +283,40 @@ class TestReadWriteMixin(object):
             ws.close()
             rs.close()
 
+    @gen_test
+    async def test_read_until_with_close_after_second_packet(self):
+        # This is a regression test for a regression in Tornado 6.0
+        # (maybe 6.0.3?) reported in
+        # https://github.com/tornadoweb/tornado/issues/2717
+        #
+        # The data arrives in two chunks; the stream is closed at the
+        # same time that the second chunk is received. If the second
+        # chunk is larger than the first, it works, but when this bug
+        # existed it would fail if the second chunk were smaller than
+        # the first. This is due to the optimization that the
+        # read_until condition is only checked when the buffer doubles
+        # in size
+        async with self.iostream_pair() as (rs, ws):
+            rf = asyncio.ensure_future(rs.read_until(b"done"))
+            await ws.write(b"x" * 2048)
+            ws.write(b"done")
+            ws.close()
+            await rf
+
+    @gen_test
+    async def test_read_until_unsatisfied_after_close(self: typing.Any):
+        # If a stream is closed while reading, it raises
+        # StreamClosedError instead of UnsatisfiableReadError (the
+        # latter should only be raised when byte limits are reached).
+        # The particular scenario tested here comes from #2717.
+        async with self.iostream_pair() as (rs, ws):
+            rf = asyncio.ensure_future(rs.read_until(b"done"))
+            await ws.write(b"x" * 2048)
+            ws.write(b"foo")
+            ws.close()
+            with self.assertRaises(StreamClosedError):
+                await rf
+
     @gen_test
     def test_close_callback_with_pending_read(self: typing.Any):
         # Regression test for a bug that was introduced in 2.3

pip install -e .
parse_log_pytest
pytest
pycurl twisted pycares pytest
apt-get update apt-get install -y gcc
3.8
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
Automat==24.8.1
cffi==1.17.1
constantly==23.10.4
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
hyperlink==21.0.0
idna==3.10
incremental==24.7.2
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1720101850331/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042571233/work
pycares==4.4.0
pycparser==2.22
pycurl==7.45.6
pytest @ file:///croot/pytest_1717793244625/work
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
-e git+https://github.com/tornadoweb/tornado.git@18b653cf93fe870cbc630fb48595e1b92fc1e06c#egg=tornado
Twisted==24.11.0
typing_extensions==4.13.0
zope.interface==7.2

name: tornado
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py38h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.1=py38h06a4308_0
  - pip=24.2=py38h06a4308_0
  - pluggy=1.0.0=py38h06a4308_1
  - pytest=7.4.4=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py38h06a4308_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - automat==24.8.1
      - cffi==1.17.1
      - constantly==23.10.4
      - hyperlink==21.0.0
      - idna==3.10
      - incremental==24.7.2
      - pycares==4.4.0
      - pycparser==2.22
      - pycurl==7.45.6
      - twisted==24.11.0
      - typing-extensions==4.13.0
      - zope-interface==7.2
prefix: /opt/conda/envs/tornado

tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_with_close_after_second_packet tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_with_close_after_second_packet
tornado/test/iostream_test.py::TestIOStreamWebMixin::test_connection_closed tornado/test/iostream_test.py::TestIOStreamWebMixin::test_read_until_close tornado/test/iostream_test.py::TestIOStreamWebMixin::test_read_zero_bytes tornado/test/iostream_test.py::TestIOStreamWebMixin::test_write_while_connecting tornado/test/iostream_test.py::TestIOStreamWebMixin::test_future_interface tornado/test/iostream_test.py::TestIOStreamWebMixin::test_future_close_while_reading tornado/test/iostream_test.py::TestIOStreamWebMixin::test_future_read_until_close tornado/test/iostream_test.py::TestReadWriteMixin::test_write_zero_bytes tornado/test/iostream_test.py::TestReadWriteMixin::test_future_delayed_close_callback tornado/test/iostream_test.py::TestReadWriteMixin::test_close_buffered_data tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_close_after_close tornado/test/iostream_test.py::TestReadWriteMixin::test_large_read_until tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_with_close_after_second_packet tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestReadWriteMixin::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestReadWriteMixin::test_future_close_callback tornado/test/iostream_test.py::TestReadWriteMixin::test_write_memoryview tornado/test/iostream_test.py::TestReadWriteMixin::test_read_bytes_partial tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_max_bytes tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestReadWriteMixin::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestReadWriteMixin::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestReadWriteMixin::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestReadWriteMixin::test_flow_control tornado/test/iostream_test.py::TestReadWriteMixin::test_read_into tornado/test/iostream_test.py::TestReadWriteMixin::test_read_into_partial tornado/test/iostream_test.py::TestReadWriteMixin::test_read_into_zero_bytes tornado/test/iostream_test.py::TestReadWriteMixin::test_many_mixed_reads tornado/test/iostream_test.py::TestIOStreamMixin::test_write_zero_bytes tornado/test/iostream_test.py::TestIOStreamMixin::test_future_delayed_close_callback tornado/test/iostream_test.py::TestIOStreamMixin::test_close_buffered_data tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_close_after_close tornado/test/iostream_test.py::TestIOStreamMixin::test_large_read_until tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_with_close_after_second_packet tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestIOStreamMixin::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestIOStreamMixin::test_future_close_callback tornado/test/iostream_test.py::TestIOStreamMixin::test_write_memoryview tornado/test/iostream_test.py::TestIOStreamMixin::test_read_bytes_partial tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_max_bytes tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamMixin::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestIOStreamMixin::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestIOStreamMixin::test_flow_control tornado/test/iostream_test.py::TestIOStreamMixin::test_read_into tornado/test/iostream_test.py::TestIOStreamMixin::test_read_into_partial tornado/test/iostream_test.py::TestIOStreamMixin::test_read_into_zero_bytes tornado/test/iostream_test.py::TestIOStreamMixin::test_many_mixed_reads tornado/test/iostream_test.py::TestIOStreamMixin::test_connection_refused tornado/test/iostream_test.py::TestIOStreamMixin::test_gaierror tornado/test/iostream_test.py::TestIOStreamMixin::test_read_until_close_with_error tornado/test/iostream_test.py::TestIOStreamMixin::test_inline_read_error tornado/test/iostream_test.py::TestIOStreamMixin::test_async_read_error_logging tornado/test/iostream_test.py::TestIOStreamMixin::test_future_write
tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_connection_closed tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_future_close_while_reading tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_future_interface tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_future_read_until_close tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_read_until_close tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_read_zero_bytes tornado/test/iostream_test.py::TestIOStreamWebHTTP::test_write_while_connecting tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_connection_closed tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_future_close_while_reading tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_future_interface tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_future_read_until_close tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_read_until_close tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_read_zero_bytes tornado/test/iostream_test.py::TestIOStreamWebHTTPS::test_write_while_connecting tornado/test/iostream_test.py::TestIOStream::test_async_read_error_logging tornado/test/iostream_test.py::TestIOStream::test_close_buffered_data tornado/test/iostream_test.py::TestIOStream::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestIOStream::test_connection_refused tornado/test/iostream_test.py::TestIOStream::test_flow_control tornado/test/iostream_test.py::TestIOStream::test_future_close_callback tornado/test/iostream_test.py::TestIOStream::test_future_delayed_close_callback tornado/test/iostream_test.py::TestIOStream::test_future_write tornado/test/iostream_test.py::TestIOStream::test_gaierror tornado/test/iostream_test.py::TestIOStream::test_inline_read_error tornado/test/iostream_test.py::TestIOStream::test_large_read_until tornado/test/iostream_test.py::TestIOStream::test_many_mixed_reads tornado/test/iostream_test.py::TestIOStream::test_read_bytes_partial tornado/test/iostream_test.py::TestIOStream::test_read_into tornado/test/iostream_test.py::TestIOStream::test_read_into_partial tornado/test/iostream_test.py::TestIOStream::test_read_into_zero_bytes tornado/test/iostream_test.py::TestIOStream::test_read_until_close_after_close tornado/test/iostream_test.py::TestIOStream::test_read_until_close_with_error tornado/test/iostream_test.py::TestIOStream::test_read_until_max_bytes tornado/test/iostream_test.py::TestIOStream::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStream::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestIOStream::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestIOStream::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStream::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestIOStream::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestIOStream::test_read_until_with_close_after_second_packet tornado/test/iostream_test.py::TestIOStream::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestIOStream::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestIOStream::test_write_memoryview tornado/test/iostream_test.py::TestIOStream::test_write_zero_bytes tornado/test/iostream_test.py::TestIOStreamSSL::test_async_read_error_logging tornado/test/iostream_test.py::TestIOStreamSSL::test_close_buffered_data tornado/test/iostream_test.py::TestIOStreamSSL::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestIOStreamSSL::test_connection_refused tornado/test/iostream_test.py::TestIOStreamSSL::test_flow_control tornado/test/iostream_test.py::TestIOStreamSSL::test_future_close_callback tornado/test/iostream_test.py::TestIOStreamSSL::test_future_delayed_close_callback tornado/test/iostream_test.py::TestIOStreamSSL::test_future_write tornado/test/iostream_test.py::TestIOStreamSSL::test_gaierror tornado/test/iostream_test.py::TestIOStreamSSL::test_inline_read_error tornado/test/iostream_test.py::TestIOStreamSSL::test_large_read_until tornado/test/iostream_test.py::TestIOStreamSSL::test_many_mixed_reads tornado/test/iostream_test.py::TestIOStreamSSL::test_read_bytes_partial tornado/test/iostream_test.py::TestIOStreamSSL::test_read_into tornado/test/iostream_test.py::TestIOStreamSSL::test_read_into_partial tornado/test/iostream_test.py::TestIOStreamSSL::test_read_into_zero_bytes tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_close_after_close tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_close_with_error tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_max_bytes tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamSSL::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestIOStreamSSL::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestIOStreamSSL::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestIOStreamSSL::test_write_memoryview tornado/test/iostream_test.py::TestIOStreamSSL::test_write_zero_bytes tornado/test/iostream_test.py::TestIOStreamSSLContext::test_async_read_error_logging tornado/test/iostream_test.py::TestIOStreamSSLContext::test_close_buffered_data tornado/test/iostream_test.py::TestIOStreamSSLContext::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestIOStreamSSLContext::test_connection_refused tornado/test/iostream_test.py::TestIOStreamSSLContext::test_flow_control tornado/test/iostream_test.py::TestIOStreamSSLContext::test_future_close_callback tornado/test/iostream_test.py::TestIOStreamSSLContext::test_future_delayed_close_callback tornado/test/iostream_test.py::TestIOStreamSSLContext::test_future_write tornado/test/iostream_test.py::TestIOStreamSSLContext::test_gaierror tornado/test/iostream_test.py::TestIOStreamSSLContext::test_inline_read_error tornado/test/iostream_test.py::TestIOStreamSSLContext::test_large_read_until tornado/test/iostream_test.py::TestIOStreamSSLContext::test_many_mixed_reads tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_bytes_partial tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_into tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_into_partial tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_into_zero_bytes tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_close_after_close tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_close_with_error tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_max_bytes tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestIOStreamSSLContext::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestIOStreamSSLContext::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestIOStreamSSLContext::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestIOStreamSSLContext::test_write_memoryview tornado/test/iostream_test.py::TestIOStreamSSLContext::test_write_zero_bytes tornado/test/iostream_test.py::TestIOStreamStartTLS::test_check_hostname tornado/test/iostream_test.py::TestIOStreamStartTLS::test_handshake_fail tornado/test/iostream_test.py::TestIOStreamStartTLS::test_start_tls_smtp tornado/test/iostream_test.py::WaitForHandshakeTest::test_wait_for_handshake_already_connected tornado/test/iostream_test.py::WaitForHandshakeTest::test_wait_for_handshake_already_waiting_error tornado/test/iostream_test.py::WaitForHandshakeTest::test_wait_for_handshake_future tornado/test/iostream_test.py::TestPipeIOStream::test_close_buffered_data tornado/test/iostream_test.py::TestPipeIOStream::test_close_callback_with_pending_read tornado/test/iostream_test.py::TestPipeIOStream::test_flow_control tornado/test/iostream_test.py::TestPipeIOStream::test_future_close_callback tornado/test/iostream_test.py::TestPipeIOStream::test_future_delayed_close_callback tornado/test/iostream_test.py::TestPipeIOStream::test_large_read_until tornado/test/iostream_test.py::TestPipeIOStream::test_many_mixed_reads tornado/test/iostream_test.py::TestPipeIOStream::test_pipe_iostream tornado/test/iostream_test.py::TestPipeIOStream::test_pipe_iostream_big_write tornado/test/iostream_test.py::TestPipeIOStream::test_read_bytes_partial tornado/test/iostream_test.py::TestPipeIOStream::test_read_into tornado/test/iostream_test.py::TestPipeIOStream::test_read_into_partial tornado/test/iostream_test.py::TestPipeIOStream::test_read_into_zero_bytes tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_close_after_close tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_max_bytes tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_max_bytes_ignores_extra tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_max_bytes_inline tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_regex_max_bytes tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_regex_max_bytes_ignores_extra tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_regex_max_bytes_inline tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_unsatisfied_after_close tornado/test/iostream_test.py::TestPipeIOStream::test_read_until_with_close_after_second_packet tornado/test/iostream_test.py::TestPipeIOStream::test_small_read_untils_from_large_buffer tornado/test/iostream_test.py::TestPipeIOStream::test_small_reads_from_large_buffer tornado/test/iostream_test.py::TestPipeIOStream::test_write_memoryview tornado/test/iostream_test.py::TestPipeIOStream::test_write_zero_bytes tornado/test/iostream_test.py::TestStreamBuffer::test_large tornado/test/iostream_test.py::TestStreamBuffer::test_small
tornado/iostream.py
tornado/iostream.py