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

Method Peek

internal/queue/timequeue.go:44–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (t *TimeQueue[T]) Peek() T {
45 t.mu.Lock()
46 defer t.mu.Unlock()
47
48 if t.heap.Len() == 0 {
49 var zero T
50 return zero
51 }
52 return t.heap.Peek().v
53}
54
55func (t *TimeQueue[T]) Reset() []T {
56 t.mu.Lock()

Callers 1

DequeueMethod · 0.45

Calls 3

LockMethod · 0.80
UnlockMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected