MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / CleanupLoop

Method CleanupLoop

internal/bridge/taskmanager.go:340–351  ·  view source on GitHub ↗

CleanupLoop runs Cleanup periodically until ctx is cancelled.

(done <-chan struct{}, maxAge time.Duration)

Source from the content-addressed store, hash-verified

338
339// CleanupLoop runs Cleanup periodically until ctx is cancelled.
340func (tm *TaskManager) CleanupLoop(done <-chan struct{}, maxAge time.Duration) {
341 ticker := time.NewTicker(60 * time.Second)
342 defer ticker.Stop()
343 for {
344 select {
345 case <-ticker.C:
346 tm.Cleanup(maxAge)
347 case <-done:
348 return
349 }
350 }
351}

Callers 1

StartMethod · 0.80

Calls 2

CleanupMethod · 0.95
StopMethod · 0.65

Tested by

no test coverage detected