def serve(self):
        """Start workers and put into queue"""
        # this is a shared state that can tell the workers to exit when False
        self.isRunning.value = True

        # first bind and listen to the port
        self.serverTransport.listen()

        # fork the children
        for i in range(self.numWorkers):
            try:
                w = Process(target=self.workerProcess)
                w.daemon = True
                w.start()
                self.workers.append(w)
            except Exception, x:
                logging.exception(x)

        # wait until the condition is set by stop()
        while True:
            self.stopCondition.acquire()
            try:
                self.stopCondition.wait()
                break
            except (SystemExit, __HOLE__):
                break
            except Exception, x:
                logging.exception(x)

        self.isRunning.value = False
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/thrift-0.9.1/src/server/TProcessPoolServer.py/TProcessPoolServer.serve