1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00

non-blocking cleanup of the queue for abort

This commit is contained in:
Joel Bender 2017-04-27 21:26:24 -04:00
parent 34039b5cc7
commit 0bb03f83d7

View File

@ -474,6 +474,7 @@ class IOQueue:
# if the queue is empty and we do not block return None # if the queue is empty and we do not block return None
if not block and not self.notempty.isSet(): if not block and not self.notempty.isSet():
if _debug: IOQueue._debug(" - not blocking and empty")
return None return None
# wait for something to be in the queue # wait for something to be in the queue
@ -673,7 +674,7 @@ class IOQController(IOController):
return return
while True: while True:
iocb = self.ioQueue.get() iocb = self.ioQueue.get(block=0)
if not iocb: if not iocb:
break break
if _debug: IOQController._debug(" - iocb: %r", iocb) if _debug: IOQController._debug(" - iocb: %r", iocb)