diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/qpid/queue.py | 4 | ||||
-rw-r--r-- | python/qpid/util.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/python/qpid/queue.py b/python/qpid/queue.py index c9f4d1d1d0..63a7684843 100644 --- a/python/qpid/queue.py +++ b/python/qpid/queue.py @@ -63,7 +63,9 @@ class Queue(BaseQueue): if listener is None: if self.thread is not None: self.put(Queue.STOP) - self.thread.join() + # loop and timed join permit keyboard interrupts to work + while self.thread.isAlive(): + self.thread.join(3) self.thread = None self.listener = listener diff --git a/python/qpid/util.py b/python/qpid/util.py index bb7f5090df..f4b613f4e5 100644 --- a/python/qpid/util.py +++ b/python/qpid/util.py @@ -50,7 +50,9 @@ def wait(condition, predicate, timeout=None): start = time.time() while not predicate(): if timeout is None: - condition.wait() + # using the timed wait prevents keyboard interrupts from being + # blocked while waiting + condition.wait(3) elif passed < timeout: condition.wait(timeout - passed) else: |