def run(self):

        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 KeyboardInterrupt:
            # let the main thread know we got a SIGINT
            import _thread
            _thread.interrupt_main()
            raise
        except BaseException as err:
            raise
        finally:
            self._running = False
Run the rpc thread.
dataset/ETHPy150Open felix-lang/fbuild/lib/fbuild/rpc.py/RPC.run