MCPcopy
hub / github.com/garethgeorge/backrest / GetAll

Method GetAll

internal/queue/timepriorityqueue.go:55–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55func (t *TimePriorityQueue[T]) GetAll() []T {
56 t.tqueue.mu.Lock()
57 defer t.tqueue.mu.Unlock()
58 res := make([]T, 0, t.tqueue.heap.Len()+t.ready.Len())
59 for _, entry := range t.tqueue.heap {
60 res = append(res, entry.v.v)
61 }
62 for _, entry := range t.ready {
63 res = append(res, entry.v)
64 }
65 return res
66}
67
68func (t *TimePriorityQueue[T]) Remove(v T) {
69 t.tqueue.mu.Lock()

Callers

nothing calls this directly

Calls 3

LockMethod · 0.80
UnlockMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected