Giraffe.PriorityQueue (giraffe v0.1.4)
A Priority Queue implementation using a list-based heap structure. Lower priority values are dequeued first.
Summary
Functions
Dequeues the item with the lowest priority Returns {item, new_queue} or :empty if queue is empty
Checks if the queue is empty
Enqueues an item with a given priority
Creates a new empty priority queue
Returns the highest priority item without removing it from the queue Returns {:ok, item} or :empty if queue is empty
Returns the size of the queue
Types
Functions
Dequeues the item with the lowest priority Returns {item, new_queue} or :empty if queue is empty
Checks if the queue is empty
Enqueues an item with a given priority
@spec new() :: t()
Creates a new empty priority queue
Returns the highest priority item without removing it from the queue Returns {:ok, item} or :empty if queue is empty
Returns the size of the queue