MCPcopy Create free account
hub / github.com/devld/go-drive / runCleaner

Method runCleaner

script/pool.go:162–174  ·  view source on GitHub ↗
(period time.Duration)

Source from the content-addressed store, hash-verified

160}
161
162func (p *VMPool) runCleaner(period time.Duration) {
163 defer p.cleaner.Done()
164 ticker := time.NewTicker(period)
165 defer ticker.Stop()
166 for {
167 select {
168 case <-ticker.C:
169 p.cleanExpired()
170 case <-p.stop:
171 return
172 }
173 }
174}
175
176func (p *VMPool) cleanExpired() {
177 now := time.Now()

Callers 1

NewVMPoolFunction · 0.95

Calls 1

cleanExpiredMethod · 0.95

Tested by

no test coverage detected