MCPcopy
hub / github.com/git-lfs/git-lfs / Enqueue

Method Enqueue

tasklog/log.go:150–175  ·  view source on GitHub ↗

Enqueue enqueues the given Tasks "ts".

(ts ...Task)

Source from the content-addressed store, hash-verified

148
149// Enqueue enqueues the given Tasks "ts".
150func (l *Logger) Enqueue(ts ...Task) {
151 if l == nil {
152 for _, t := range ts {
153 if t == nil {
154 // NOTE: Do not allow nil tasks which are unable
155 // to be completed.
156 continue
157 }
158 go func(t Task) {
159 for range t.Updates() {
160 // Discard all updates.
161 }
162 }(t)
163 }
164 return
165 }
166
167 l.wg.Add(len(ts))
168 for _, t := range ts {
169 if t == nil {
170 // NOTE: See above.
171 continue
172 }
173 l.queue <- t
174 }
175}
176
177// consume creates a pseudo-infinte buffer between the incoming set of tasks and
178// the queue of tasks to work on.

Callers 15

checkoutCommandFunction · 0.95
pointersToFetchFunction · 0.95
pullFunction · 0.95
buildTestDataFunction · 0.95
TestLoggerLogsTasksFunction · 0.95

Calls 2

UpdatesMethod · 0.65
AddMethod · 0.65