MCPcopy Index your code
hub / github.com/syncthing/syncthing / Pop

Method Pop

lib/model/queue.go:37–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func (q *jobQueue) Pop() (string, bool) {
38 q.mut.Lock()
39 defer q.mut.Unlock()
40
41 if len(q.queued) == 0 {
42 return "", false
43 }
44
45 f := q.queued[0].name
46 q.queued = q.queued[1:]
47 q.progress = append(q.progress, f)
48
49 return f, true
50}
51
52func (q *jobQueue) BringToFront(filename string) {
53 q.mut.Lock()

Callers 6

TestJobQueueFunction · 0.45
TestQueuePaginationFunction · 0.45
processNeededMethod · 0.45

Calls 1

UnlockMethod · 0.80

Tested by 5

TestJobQueueFunction · 0.36
TestQueuePaginationFunction · 0.36