Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
super(Worker, self).__init__(*args, **kwargs)
self.daemon = True
self.quit = False
def init_workers(self, *args, **kwargs):
self.workers.clear()
for i in range(self.thread_num):
worker = Worker(
target=self.worker_exec,
name='{}-{:03d}'.format(self.name, i + 1),
args=args,
kwargs=kwargs)
self.workers.append(worker)