Signal
Signal
Section titled “Signal”Kind: class
Source: src/graphrefly/_kernel/signal.py:10
Signature
Section titled “Signature”Signal()Description
Section titled “Description”Aborted when its lifetime closes; not by an INVALIDATE or a rerun.
Work a function starts for the lifetime (a timer, a request) listens with
:meth:on_abort and stops when it fires, instead of checking :attr:aborted
in a loop.
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
aborted | bool | Whether the lifetime has closed. |
Methods
Section titled “Methods”on_abort
Section titled “on_abort”on_abort(listener: Callable[[], object]) -> Callable[[], None]Call listener once when the lifetime closes; return a function that removes it.
On a signal already aborted the listener runs at once.
Source: src/graphrefly/_kernel/signal.py:30