MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/openevolve / sem_task

Function sem_task

openevolve/utils/async_utils.py:105–107  ·  view source on GitHub ↗
(task: asyncio.Future)

Source from the content-addressed store, hash-verified

103 semaphore = asyncio.Semaphore(n)
104
105 async def sem_task(task: asyncio.Future) -> Any:
106 async with semaphore:
107 return await task
108
109 return await asyncio.gather(
110 *(sem_task(task) for task in tasks), return_exceptions=return_exceptions

Callers 1

gather_with_concurrencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected