def start(self):
        """Start thread."""
        if not self._thread:
            logging.info("Starting asterisk mbox thread")
            # Ensure signal queue is empty
            try:
                while True:
                    self.signal.get(False)
            except queue.Empty:
                pass
            self._thread = threading.Thread(target=self._loop)
            self._thread.setDaemon(True)
            self._thread.start()
def start ( self ) : if not self . _thread : logging . info ( "Starting asterisk mbox thread" ) try : while True : self . signal . get ( False ) except queue . Empty : pass self . _thread = threading . Thread ( target = self . _loop ) self . _thread . setDaemon ( True ) self . _thread . start ( )
Start thread.