MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / PushFront

Method PushFront

AdaptixServer/core/utils/safe/queue.go:53–64  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

51}
52
53func (q *Queue) PushFront(value interface{}) {
54 q.lock.Lock()
55 defer q.lock.Unlock()
56
57 if q.size == q.capacity {
58 q.resize()
59 }
60
61 q.head = (q.head - 1 + q.capacity) % q.capacity
62 q.buffer[q.head] = value
63 q.size++
64}
65
66func (q *Queue) Pop() (interface{}, error) {
67 q.lock.Lock()

Callers 3

extractHostedTasksMethod · 0.80
extractTunnelTasksMethod · 0.80
extractTunnelDataMethod · 0.80

Calls 1

resizeMethod · 0.95

Tested by

no test coverage detected