Merge pull request #5 from intelxed/mjc/term-race

fixed termination race condition by not clearing thread list
This commit is contained in:
Mark Charney
2016-12-19 14:09:06 -05:00
committed by GitHub

View File

@@ -648,7 +648,6 @@ class work_queue_t(object):
if verbose(3):
msgb("SENT TERMINATOR", str(i))
self._start_a_job(t)
self.threads = []
def _join_threads(self):
"""Use this when not running threads in daemon-mode"""
@@ -656,7 +655,8 @@ class work_queue_t(object):
t.join()
if verbose(3):
msgb("WORKER THREAD TERMINATED")
self.threads = []
def _add_one(self,command):
"""Add a single command of type L{command_t} to the list
of jobs to run."""