MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / _ZeroMqQueue_sync_sync_task

Function _ZeroMqQueue_sync_sync_task

tests/unittest/llmapi/test_executor.py:337–356  ·  view source on GitHub ↗
(addr: str)

Source from the content-addressed store, hash-verified

335
336
337def _ZeroMqQueue_sync_sync_task(addr: str):
338 print(f"Setup receiver: {addr}")
339 pull_pipe = ZeroMqQueue(address=addr, is_server=False, is_async=True)
340 print(f"after setup receiver")
341
342 total = 0
343
344 async def task():
345 print(f"running task")
346 for i in range(10):
347 print(f"waiting for msg")
348 msg = await pull_pipe.get_async()
349 print(f"received: {msg}")
350 nonlocal total
351 total += msg
352
353 print(f"to run task")
354 asyncio.run(task())
355
356 return total
357
358
359def test_ZeroMqQueue_sync_async():

Callers

nothing calls this directly

Calls 3

ZeroMqQueueClass · 0.90
taskFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected