Jason Tackaberry wrote: > + callback = WeakCallback(callback, *args, **kwargs) > # We create a callback for weakref destruction for both the > - # signal callback as well as signal data. The destroy callback > - # has the signal callback passed as the first parameter (because > - # set_user_args_first() is called), and WeakCallback will pass > - # the weakref object itself as the second parameter. > + # signal callback as well as signal data. > destroy_cb = Callback(self._weakref_destroyed, callback) > - destroy_cb.set_user_args_first() > callback.set_weakref_destroyed_cb(destroy_cb)
Da we need that extra callback? __call__ in WeakCallback should return False when the callback is invalid and we could remove the callback on next emit. Yes, I know it would not be 100% right because __len__ returns something wrong, but it would avoid creating an extra callback object. Dischi -- WARNING: I cannot be held responsible for the above, as apparently my cats have learned how to type.
pgpYEiSTvaRdz.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel