MCPcopy Create free account
hub / github.com/chrislusf/glow / Enqueue

Method Enqueue

util/priority_queue.go:31–33  ·  view source on GitHub ↗
(x interface{}, sourceId int)

Source from the content-addressed store, hash-verified

29}
30
31func (pq *PriorityQueue) Enqueue(x interface{}, sourceId int) {
32 heap.Push(pq, &Item{value: x, sourceId: sourceId})
33}
34
35func (pq *PriorityQueue) Dequeue() (interface{}, int) {
36 item := heap.Pop(pq).(*Item)

Callers 3

MergeSortedMethod · 0.95
TestSortedDataFunction · 0.95

Calls 1

PushMethod · 0.80

Tested by 1

TestSortedDataFunction · 0.76