exopy.utils.priority_heap module

Priority heap based on list and heapq module.

class exopy.utils.priority_heap.PriorityHeap[source]

Bases: object

A priority heap implementation based on a heapq.

push(priority, obj)[source]

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.