7 Sep
2004
7 Sep
'04
7:07 p.m.
Stefan Behnel wrote:
Stefan Behnel schrieb:
I guess I do see a problem if the value of a call somewhere in the heap is changed. That brakes the heap invariant and may conflict with further changes to the heap. Let me think about it.
Ok, I thought about it. And I believe the best way to do this is to write a specialized heap version. I copied the heapq implementation and adapted it so that it keeps track of the position in the heap for each DelayedCall. That makes it possible to remove a call without linear overhead and in log(N) time. [snip]
heapq.py is under the PSF license. PSF is roughly similar to MIT. Is this going to be okay for inclusion in Twisted? Jp