MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / limited_request_func

Function limited_request_func

benchmarks/quick_benchmark.py:374–378  ·  view source on GitHub ↗
(request_func_input, pbar)

Source from the content-addressed store, hash-verified

372 semaphore = asyncio.Semaphore(max_concurrency) if max_concurrency else None
373
374 async def limited_request_func(request_func_input, pbar):
375 if semaphore is None:
376 return await request_func(request_func_input=request_func_input, pbar=pbar)
377 async with semaphore:
378 return await request_func(request_func_input=request_func_input, pbar=pbar)
379
380 benchmark_start_time = time.perf_counter()
381

Callers 1

benchmarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected