From 68a82f29f1f74bac99ebc9d9264fcf39801ef453 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 19 Jun 2015 17:26:11 -0700 Subject: [PATCH] Ensure we 'join' on the timer watchdog thread This object is just another thread and its cancel method does not join on itself, so we should make sure that we do to avoid leaving threads lying around. Change-Id: I37e3170b58627dee93513ec222f9a55001389dad --- oslo_concurrency/watchdog.py | 1 + 1 file changed, 1 insertion(+) diff --git a/oslo_concurrency/watchdog.py b/oslo_concurrency/watchdog.py index 692e9ba..72b3680 100644 --- a/oslo_concurrency/watchdog.py +++ b/oslo_concurrency/watchdog.py @@ -67,3 +67,4 @@ def watch(logger, action, level=logging.DEBUG, after=5.0): yield finally: timer.cancel() + timer.join()