

def start(self):
    _logger.info('starting StdoutWatcher')
    while True:
        try:
            data = self.server.stdout.readline().decode('utf-8')
        except Exception as e:
            msg = (('error in thread' + self.name) + '\n')
            msg += str(e)
            _logger.error(msg)
            continue
        _logger.debug('data read from server: %s', repr(data))
        if (not data):
            if self.server.stdin.closed:
                _logger.info('StdoutWatcher is exiting by internal request')
                return
            _logger.debug('StdoutWatcher - no data')
            return
        decoded = json.loads(data)
        self.server.responses.put(decoded, view=decoded.get('file'), block=False)
    _logger.error('StdoutWatcher exited unexpectedly')

dataset/ETHPy150Open guillermooo/dart-sublime-bundle/lib/analyzer/analyzer.py StdoutWatcher.start/original