From 284b3a24f7e3b88afee218de3cddecdab925b7e5 Mon Sep 17 00:00:00 2001 From: "miao.lin" Date: Fri, 28 Jun 2013 18:22:10 +0800 Subject: [PATCH] Put setDaemon inside init. --- src/class_bgWorker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class_bgWorker.py b/src/class_bgWorker.py index c163bcc0..c01e26ef 100644 --- a/src/class_bgWorker.py +++ b/src/class_bgWorker.py @@ -13,6 +13,7 @@ class bgWorker(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.q = Queue.Queue() + self.setDaemon(True) def post(self,job): self.q.put(job) @@ -34,5 +35,4 @@ class bgWorker(threading.Thread): time.sleep(0.05) bgworker = bgWorker() -bgworker.setDaemon(True) bgworker.start()