flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

Add priority message queue implementation

Open peterargue opened this issue 4 months ago • 1 comments
trafficstars

This is a generic implementation of a priority message queue, which utilizes the container/heap implementation.

peterargue avatar Jun 27 '25 15:06 peterargue

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

codecov-commenter avatar Jun 27 '25 15:06 codecov-commenter

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.

peterargue avatar Jul 15 '25 17:07 peterargue