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, controller, optimizer, rvalue=lambda r: r.value):
logger.debug("Initialize ThreadStrategy")
PromiseStrategy.__init__(self, rvalue, block=False)
self.thread = self.OptimizerThread(self, optimizer)
self.thread.start()
controller.add_term_callback(self.on_terminate)