class documentation
class _ConnectionRecord: (source)
Constructor: _ConnectionRecord(server, client_factory, idle_timeout)
A single MCP session held open by a dedicated owner task.
The MCP transport and ClientSession are anyio context managers whose cancel scope is bound to the task that enters them, so they must be entered and exited in the same task. _run owns that task for the connection's whole lifetime; call_tool activities on the same event loop invoke session.call_tool directly (MCP multiplexes concurrent requests by id).
| Method | __init__ |
Undocumented |
| Async Method | aclose |
Signal the owner task to exit its context managers and wait for it. |
| Method | acquire |
Mark a call in flight; pause idle eviction while calls are active. |
| Method | release |
Mark a call done; arm idle eviction once no calls remain in flight. |
| Async Method | session |
Return the live client and session, or raise the connect failure. |
| Async Method | _maybe |
Undocumented |
| Method | _on |
Undocumented |
| Async Method | _run |
Undocumented |
| Instance Variable | _idle |
Undocumented |
| Instance Variable | _idle |
Undocumented |
| Instance Variable | _idle |
Undocumented |
| Instance Variable | _inflight |
Undocumented |
| Instance Variable | _owner |
Undocumented |
| Instance Variable | _ready |
Undocumented |
| Instance Variable | _server |
Undocumented |
| Instance Variable | _stop |
Undocumented |