flow-go
flow-go copied to clipboard
Add priority message queue implementation
This is a generic implementation of a priority message queue, which utilizes the container/heap implementation.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!
I wish we had golang/go#47632.
How come we are requiring that the PriorityQueue is a heap, instead of the PriorityQueue using a heap and just exposing its own methods that don't use any?
@janezpodhostnik PriorityQueue is a copy of the container/heap example, though I actually sourced it from our network implementation.
It basically is a max heap implementation, just named priority queue since that's the usecase.