fix remove_all_events
The threaded event emitter did not remove the wrapper mapping when remove_all_events were called causing trailing references to objects.pull/2375/head
parent
d4a7193fe8
commit
3aea18c7be
|
@ -55,3 +55,11 @@ class ThreadedEventEmitter(EventEmitter):
|
|||
return super().remove_listener(event_name, w[1])
|
||||
# if no wrapper exists try removing the function
|
||||
return super().remove_listener(event_name, func)
|
||||
|
||||
def remove_all_listeners(self, event_name):
|
||||
"""Remove all listeners with name.
|
||||
|
||||
event_name: identifier of event handler
|
||||
"""
|
||||
super().remove_all_listeners(event_name)
|
||||
self.wrappers.pop(event_name)
|
||||
|
|
Loading…
Reference in New Issue