MCPcopy Create free account
hub / github.com/cortexproject/cortex / Less

Method Less

pkg/util/priority_queue.go:28–28  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

26
27func (q queue) Len() int { return len(q) }
28func (q queue) Less(i, j int) bool { return q[i].Priority() > q[j].Priority() }
29func (q queue) Swap(i, j int) { q[i], q[j] = q[j], q[i] }
30
31// Push and Pop use pointer receivers because they modify the slice's length,

Calls 1

PriorityMethod · 0.65