MCPcopy
hub / github.com/grafana/tempo / Less

Method Less

modules/backendscheduler/work/tenantselector/priority.go:54–57  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

52func (pq PriorityQueue) Len() int { return len(pq) }
53
54func (pq PriorityQueue) Less(i, j int) bool {
55 // We want Pop to give us the highest, not lowest, priority so we use greater than here.
56 return pq[i].priority > pq[j].priority
57}
58
59func (pq PriorityQueue) Swap(i, j int) {
60 pq[i], pq[j] = pq[j], pq[i]

Calls

no outgoing calls