Removing the overhead of creating a new list per event
This commit is contained in:
parent
6eadfca78e
commit
ebfd1486d8
1 changed files with 4 additions and 3 deletions
|
@ -232,9 +232,10 @@ class EventLoop(object):
|
|||
logging.error(e)
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
for handler in self._handlers_to_remove:
|
||||
self._handlers.remove(handler)
|
||||
self._handlers_to_remove = []
|
||||
if self._handlers_to_remove:
|
||||
for handler in self._handlers_to_remove:
|
||||
self._handlers.remove(handler)
|
||||
self._handlers_to_remove = []
|
||||
self._iterating = False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue