Warn that signal receivers are weakly-referenced

For the signal get_generators in particular, it may seem natural to use
a lambda or inner function as the signal receiver, but this does not
work as the receiver is collected before it can be called.
This commit is contained in:
Tom Most 2014-06-29 20:05:12 -07:00 committed by Justin Mayer
commit e65d33b89c

View file

@ -57,6 +57,12 @@ which you map the signals to your plugin logic. Let's take a simple example::
def register():
signals.initialized.connect(test)
.. note::
Signal receivers are weakly-referenced and thus must not be defined within
your ``register`` callable or they will be garbage-collected before the
signal is emitted.
List of signals
===============