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:
parent
f05bea4e10
commit
8777152ec9
1 changed files with 1 additions and 0 deletions
|
@ -32,6 +32,7 @@ from configloader import load_config, get_config
|
||||||
class MainThread(threading.Thread):
|
class MainThread(threading.Thread):
|
||||||
def __init__(self, obj):
|
def __init__(self, obj):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
|
self.daemon = True
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue