MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / wait_func

Function wait_func

tools/_utils.py:240–247  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

238
239 @wraps(func)
240 async def wait_func(*args, **kwargs):
241 nonlocal __current_size
242 while __current_size >= max_size:
243 await asyncio.sleep(waitting_time)
244 __current_size += 1
245 result = await func(*args, **kwargs)
246 __current_size -= 1
247 return result
248
249 return wait_func
250

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected