Priority heap based on list and heapq module.
A priority heap implementation based on a heapq.
Push a task with a given priority on the queue.
priority (int) – Priority associated with the object to push.
obj – Object to push on the heap.
Pop a task from the queue.
Mark a task as being outdated.
This is the only way to remove an object from a heap without messing with the sorting.