qat.engines.qblox.transport moduleο
Close a Qblox cluster together with the asyncio loops its transports leak.
qblox-instruments 1.3.x runs its transport and SCPI layers on dedicated
asyncio event loops, one per cluster transport and one per module transport.
Cluster.close() stops the connection and discards the transport without closing those
loops, so the loops and their self-pipe sockets survive until garbage collection. When
collection happens the interpreter emits a ResourceWarning, which pytest promotes
to an error under its filterwarnings configuration and attributes to whichever test is
running at the time.
The helpers are plain module-level functions so any owner of a Cluster can reclaim its
transports by calling close_cluster() on the driver.
- close_cluster(driver)ο
Close a Qblox cluster driver and the event loops leaked by its transports.
The transport loops are collected before
driver.close()discards them and closed afterwards, so no loops or sockets outlive the driver.- Parameters:
driverΒΆ (
Cluster|None) β Theqblox_instruments.Clusterdriver to close, orNone.- Return type:
None