Run db thread as daemon

so that all sub-thread will inherite this and be killed automatically if main thread crash
This commit is contained in:
noisyfox 2017-01-07 19:58:32 +11:00
parent f05bea4e10
commit 8777152ec9

View file

@ -32,6 +32,7 @@ from configloader import load_config, get_config
class MainThread(threading.Thread):
def __init__(self, obj):
threading.Thread.__init__(self)
self.daemon = True
self.obj = obj
def run(self):