Skip to content
PACKAGES

Signal

Kind: class

Source: src/graphrefly/_kernel/signal.py:10

Signal()

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.

NameTypeDescription
abortedboolWhether the lifetime has closed.
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