(self, func_name)
Wait until feed_data() or feed_eof() is called.

        If stream was paused, automatically resume it.
Wait until feed_data() or feed_eof() is called.
Wait until feed_data () or feed_eof () is called .
async def _wait_for_data(self, func_name):
        """Wait until feed_data() or feed_eof() is called.

        If stream was paused, automatically resume it.
        """
        # StreamReader uses a future to link the protocol feed_data() method
        # to a read coroutine. Running two read coroutines at the same time
        # would have an unexpected behaviour. It would not possible to know
        # which coroutine would get the next data.
        if self._waiter is not None:
            raise RuntimeError(
                f'{func_name}() called while another coroutine is '
                f'already waiting for incoming data')

        assert not self._eof, '_wait_for_data after EOF'

        # Waiting for data while paused will make deadlock, so prevent it.
        # This is essential for readexactly(n) for case when n > self._limit.
        if self._paused:
            self._paused = False
            self._transport.resume_reading()

        self._waiter = self._loop.create_future()
        try:
            await self._waiter
        finally:
            self._waiter = None
async def _wait_for_data ( self , func_name ) : # StreamReader uses a future to link the protocol feed_data() method # to a read coroutine. Running two read coroutines at the same time # would have an unexpected behaviour. It would not possible to know # which coroutine would get the next data. if self . _waiter is not None : raise RuntimeError ( f'{func_name}() called while another coroutine is ' f'already waiting for incoming data' ) assert not self . _eof , '_wait_for_data after EOF' # Waiting for data while paused will make deadlock, so prevent it. # This is essential for readexactly(n) for case when n > self._limit. if self . _paused : self . _paused = False self . _transport . resume_reading ( ) self . _waiter = self . _loop . create_future ( ) try : await self . _waiter finally : self . _waiter = None