Subscription
Subscription
Section titled “Subscription”Kind: class
Source: src/graphrefly/_facade.py:300
Signature
Section titled “Signature”Subscription(detach: Callable[[], None], *, owner_thread: int, lifetime: _GraphLifetime | None = None)Description
Section titled “Description”What subscribe, observe and retain return: call it to stop (R-graph-surface).
stop() is idempotent. That is the shape every runtime shares (TS gives
() => void, Rust FnOnce()). For subscribe and retain it is an unsubscribe
request (R-request-order): called during a wave, the wave’s remaining arrays are
still delivered and nothing is after it ends. For observe it takes effect at once:
nothing more is handed on (R-graph-surface). Python adds two things: a with
block stops it on exit, and closed says whether it has stopped.
Graph.close() stops every one of them (graphrefly-py:D16, D17).
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
closed | bool | Return whether stop() has been called (a Python extension). |