@property
    def in_waiting(self):
        """Return the number of bytes currently in the input buffer."""
        if not self.is_open:
            raise portNotOpenError
        if self.logger:
            # attention the logged value can differ from return value in
            # threaded environments...
            self.logger.debug('in_waiting -> %d' % (self.queue.qsize(),))
        return self.queue.qsize()
dataset/ETHPy150Open pyserial/pyserial/serial/urlhandler/protocol_loop.py/Serial.in_waiting/original