On Sun, 19 Apr 2009 19:03:36 +0100
Gavin McCullagh <[email protected]> wrote:


> With a heap, things are more complex.  I guess you could give an
> indication of the depth in the heap but there would be so many
> objects on the lowest levels, I don't suppose this would be a great
> guide.  Is there some better value available, such as the key used in
> the heap maybe?

You could probably do this with a modified version of heap LRU, using a
counter rather than a timestamp as a key. You could then work-out the
relative position in the queue, from the key value, the current counter
value, and the key value at the top of the heap.



Reply via email to