TransportBase#
- class TransportBase[source]#
Bases:
ABCThe contract a transport implements:
_open_session,_teardown_session,is_open, plus shared ownership.Ownership is deferred-teardown: opened by the first owner, torn down by the last. Holders are the objects that own the connection, so a device serving several categories holds the transport once on its own behalf and does its own device-level teardown before releasing.
Initialize holder tracking and the reentrant lock.
Attributes
Whether the underlying connection is currently open. |
Methods
Close and teardown; with a holder, remove it and tear down only when the last owner leaves. |
|
Return the reentrant resource lock for atomic multi-step sequences; the holder may write/query/read inside it. |
|
Open the connection (idempotent); with a holder, admit it and return True only for the first owner. |