'Start reading from the socket and dump requests into the queue'

def start(self):

    log.info('Running    codeintel    driver...')
    buf = ''
    self.send(success=None)
    self.daemon = True
    threading.Thread.start(self)
    while (not self.quit):
        try:
            ch = self.fd_in.read(1)
        except IOError:
            log.debug('Failed    to    read    frame    length,    assuming    connection    died')
            self.quit = True
            break
        if (len(ch) == 0):
            log.debug('Input    was    closed')
            self.quit = True
            break
        if (ch == '{'):
            size = int(buf, 10)
            try:
                buf = (ch + self.fd_in.read((size - 1)))
            except IOError:
                log.debug('Failed    to    read    frame    data,    assuming    connection    died')
                self.quit = True
                break
            try:
                buf = buf.decode('utf-8')
            except UnicodeDecodeError:
                pass
            try:
                data = json.loads(buf)
                request = Request(data)
            except Exception as e:
                log.exception(e)
                self.exception(message=e.message, request=None)
                continue
            finally:
                buf = ''
            if (request.get('command') == 'abort'):
                self.do_abort(request=request)
            else:
                log.debug('queuing    request    %r', request)
                with self.queue_cv:
                    self.queue.appendleft(request)
                    self.queue_cv.notify()
        elif (ch in '0123456789'):
            buf += ch
        else:
            raise ValueError(('Invalid    request    data:    ' + ch.encode('hex')))
