def run(self):
        """Run the rpc thread."""

        self._started.set()
        self._running = True

        try:
            while True:
                msg = self._queue.get()
                try:
                    # If we received a null value, then we're supposed to shut
                    # down.
                    if msg is _NULL:
                        sys.stdout.flush()
                        break

                    self._process(msg)
                finally:
                    # ... and let the queue know we finished.
                    self._queue.task_done()
        except __HOLE__:
            # let the main thread know we got a SIGINT
            import _thread
            _thread.interrupt_main()
            raise
        except BaseException as err:
            raise
        finally:
            self._running = False
dataset/ETHPy150Open felix-lang/fbuild/lib/fbuild/rpc.py/RPC.run