27.03.14 00:16, Guido van Rossum написав(ла):
Yeah, so the pyftp fix is to keep track of how many timers were
cancelled, and if the number exceeds a threshold it just recreates the
heap, something like

heap = [x for x in heap if not x.cancelled]
heapify(heap)

See also http://bugs.python.org/issue13451 which proposes such approach for the sched module.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to