MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / __init__

Method __init__

python/ctranslate2/extensions.py:434–440  ·  view source on GitHub ↗
(self, process_func, *args, **kwargs)

Source from the content-addressed store, hash-verified

432
433class AsyncGenerator:
434 def __init__(self, process_func, *args, **kwargs):
435 self.queue = asyncio.Queue()
436 self.shutdown_event = threading.Event()
437 self.iterator_task = None
438 self.process_func = process_func
439 self.args = args
440 self.kwargs = kwargs
441
442 async def producer(self):
443 # Data generation logic here

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected