From 04979248afa82af77d02f76fbf12456bb83ae334 Mon Sep 17 00:00:00 2001 From: Christophe-Marie Duquesne Date: Tue, 17 Feb 2015 00:50:51 +0100 Subject: Stopping daemonized threads when references to these threads are lost --- kafka/util.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kafka/util.py') diff --git a/kafka/util.py b/kafka/util.py index 14d2b2c..78c3607 100644 --- a/kafka/util.py +++ b/kafka/util.py @@ -151,3 +151,6 @@ class ReentrantTimer(object): # noinspection PyAttributeOutsideInit self.timer = None self.fn = None + + def __del__(self): + self.stop() -- cgit v1.2.1