MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / schedule

Method schedule

pkg/queue/queue.go:367–378  ·  view source on GitHub ↗

schedule to check worker number

()

Source from the content-addressed store, hash-verified

365
366// schedule to check worker number
367func (q *queue) schedule() {
368 q.Lock()
369 defer q.Unlock()
370 if q.BusyWorkers() >= q.workerCount {
371 return
372 }
373
374 select {
375 case q.ready <- struct{}{}:
376 default:
377 }
378}
379
380// start to start all worker
381func (q *queue) start() {

Callers 2

workMethod · 0.95
startMethod · 0.95

Calls 3

BusyWorkersMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected