MCPcopy Create free account
hub / github.com/allegro/bigcache / Reset

Method Reset

queue/bytes_queue.go:77–84  ·  view source on GitHub ↗

Reset removes all entries from queue

()

Source from the content-addressed store, hash-verified

75
76// Reset removes all entries from queue
77func (q *BytesQueue) Reset() {
78 // Just reset indexes
79 q.tail = leftMarginIndex
80 q.head = leftMarginIndex
81 q.rightMargin = leftMarginIndex
82 q.count = 0
83 q.full = false
84}
85
86// Push copies entry at the end of queue and moves tail pointer. Allocates more space if needed.
87// Returns index for pushed data or error if maximum size queue limit is reached.

Callers 2

TestResetFullQueueFunction · 0.95
TestResetFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestResetFullQueueFunction · 0.76
TestResetFunction · 0.76