MCPcopy
hub / github.com/syncthing/syncthing / Push

Method Push

lib/model/queue.go:30–35  ·  view source on GitHub ↗
(file string, size int64, modified time.Time)

Source from the content-addressed store, hash-verified

28}
29
30func (q *jobQueue) Push(file string, size int64, modified time.Time) {
31 q.mut.Lock()
32 // The range of UnixNano covers a range of reasonable timestamps.
33 q.queued = append(q.queued, jobQueueEntry{file, size, modified.UnixNano()})
34 q.mut.Unlock()
35}
36
37func (q *jobQueue) Pop() (string, bool) {
38 q.mut.Lock()

Callers 8

TestJobQueueFunction · 0.45
TestBringToFrontFunction · 0.45
BenchmarkJobQueueBumpFunction · 0.45
TestQueuePaginationFunction · 0.45
processNeededMethod · 0.45

Calls 1

UnlockMethod · 0.80

Tested by 7

TestJobQueueFunction · 0.36
TestBringToFrontFunction · 0.36
BenchmarkJobQueueBumpFunction · 0.36
TestQueuePaginationFunction · 0.36