def close(self):
        """Immediately close all connections and stop workers."""
        if not self.is_running:
            return

        self.state = CLOSED

        self.logger.debug('closing %d worker(s)' % len(self.workers))
        gevent.killall(self.workers, block=False)

        self.logger.debug('closing %d connection(s)' % len(self.conns))
        for conn in self.conns:
            conn.close_stream()

        self.on_close.send(self)
dataset/ETHPy150Open wtolson/gnsq/gnsq/reader.py/Reader.close/original