cosapp.core.signal.slot

Module defining the Slot class.

Classes

Slot(slot[, weak])

A slot is a callable object that manages a connection to a signal.

class cosapp.core.signal.slot.Slot(slot: Callable, weak: bool = True)[source]

Bases: object

A slot is a callable object that manages a connection to a signal. If weak is true or the slot is a subclass of weakref.ref, the slot is automatically de-referenced to the called function.

property func: Callable

Return the function called by slot.

property is_alive: bool

Return True if slot is alive, False otherwise.