[Python-Dev] collections.sortedtree

Serhiy Storchaka storchaka at gmail.com
Thu Mar 27 13:07:59 CET 2014


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.




More information about the Python-Dev mailing list