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

Function test_ZeroMqQueue_sync_async

tests/unittest/llmapi/test_executor.py:359–372  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358
359def test_ZeroMqQueue_sync_async():
360 # sync send, async recv
361 push_pipe = ZeroMqQueue(is_async=False, is_server=True)
362
363 pool = ProcessPoolExecutor(max_workers=1)
364 res = pool.submit(_ZeroMqQueue_sync_sync_task, push_pipe.address)
365
366 for i in range(10):
367 print(f"put: {i}")
368 push_pipe.put(i)
369
370 assert res.result() == 45
371 pool.shutdown()
372 push_pipe.close()
373
374
375def _ZeroMqQueue_serialization_complicated_dataclass(addr: str,

Callers

nothing calls this directly

Calls 6

putMethod · 0.95
closeMethod · 0.95
ZeroMqQueueClass · 0.90
submitMethod · 0.45
resultMethod · 0.45
shutdownMethod · 0.45

Tested by

no test coverage detected