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, main_ioloop, fn, *args, **kwargs):
super(ThreadedAsyncGenerator, self).__init__()
self.main_ioloop = main_ioloop
self.fn = fn
self.args = args
self.kwargs = kwargs
self.queue = tornado.queues.Queue()
self.start()
def wrapper(*args, **kwargs):
gen = ThreadedAsyncGenerator(ioloop, fn, *args, **kwargs)
return gen
return wrapper