From 0bb03f83d796dff9cdf185cb991d8387a3592ac6 Mon Sep 17 00:00:00 2001 From: Joel Bender Date: Thu, 27 Apr 2017 21:26:24 -0400 Subject: [PATCH] non-blocking cleanup of the queue for abort --- py27/bacpypes/iocb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py27/bacpypes/iocb.py b/py27/bacpypes/iocb.py index 5b9119c..fc94e3f 100644 --- a/py27/bacpypes/iocb.py +++ b/py27/bacpypes/iocb.py @@ -474,6 +474,7 @@ class IOQueue: # if the queue is empty and we do not block return None if not block and not self.notempty.isSet(): + if _debug: IOQueue._debug(" - not blocking and empty") return None # wait for something to be in the queue @@ -673,7 +674,7 @@ class IOQController(IOController): return while True: - iocb = self.ioQueue.get() + iocb = self.ioQueue.get(block=0) if not iocb: break if _debug: IOQController._debug(" - iocb: %r", iocb)