We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae6628 commit 26d59feCopy full SHA for 26d59fe
src/guidellm/scheduler/worker.py
@@ -224,7 +224,15 @@ def process_loop_asynchronous(
224
process_id: int,
225
):
226
async def _process_runner():
227
- pending = asyncio.Semaphore(max_concurrency) if max_concurrency else None
+ if max_concurrency is not None:
228
+ if max_concurrency < 1:
229
+ raise ValueError(
230
+ f"max_concurrency must be greater than 0, got {max_concurrency}"
231
+ )
232
+
233
+ pending = asyncio.Semaphore(max_concurrency)
234
+ else:
235
+ pending = None
236
237
while (
238
process_request := await self.get_request(requests_queue)
0 commit comments