Add _use_daemons flag to XMLStream to run all threads in daemon mode.

This WILL make the Python interpreter produce exceptions on shutdown.
This commit is contained in:
Lance Stout
2012-04-20 15:19:56 -07:00
parent cb2469322b
commit 8ee30179ea
2 changed files with 6 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ class Scheduler(object):
#: Lock for accessing the task queue.
self.schedule_lock = threading.RLock()
def process(self, threaded=True):
def process(self, threaded=True, daemon=False):
"""Begin accepting and processing scheduled tasks.
:param bool threaded: Indicates if the scheduler should execute
@@ -130,6 +130,7 @@ class Scheduler(object):
if threaded:
self.thread = threading.Thread(name='scheduler_process',
target=self._process)
self.thread.daemon = daemon
self.thread.start()
else:
self._process()