wsdiscovery/daemon.py
def _sendPendingMessages(self):
        """Method sleeps, if nothing to do"""
        if len(self._queue) == 0:
            time.sleep(0.1)
            return
        msg = self._queue.pop(0)
        if msg.canSend():
            self._sendMsg(msg)
            msg.refresh()
            if not (msg.isFinished()):
                self._queue.append(msg)
        else:
            self._queue.append(msg)
            time.sleep(0.01)
def _sendPendingMessages(self):
        if len(self._queue) == 0:
            time.sleep(0.1)
            return
        msg = self._queue.pop(0)
        if msg.canSend():
            self._sendMsg(msg)
            msg.refresh()
            if not (msg.isFinished()):
                self._queue.append(msg)
        else:
            self._queue.append(msg)
            time.sleep(0.01)
def _sendPendingMessages ( self ) : if len ( self . _queue ) == 0 : time . sleep ( 0.1 ) return msg = self . _queue . pop ( 0 ) if msg . canSend ( ) : self . _sendMsg ( msg ) msg . refresh ( ) if not ( msg . isFinished ( ) ) : self . _queue . append ( msg ) else : self . _queue . append ( msg ) time . sleep ( 0.01 )
Method sleeps, if nothing to do
Method sleeps if nothing to do