def dequeue(self, maxlen, notify=True):
        with self.lock:
            pdu = self.send_queue.popleft()
            if len(pdu) <= maxlen:
                if notify == True:
                    self.send_ready.notify()
                return pdu
            else: self.send_queue.appendleft(pdu)
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/llcp/tco.py/TransmissionControlObject.dequeue/original