MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / StopAll

Method StopAll

internal/loop/manager.go:520–534  ·  view source on GitHub ↗

StopAll stops all running loops.

()

Source from the content-addressed store, hash-verified

518
519// StopAll stops all running loops.
520func (m *Manager) StopAll() {
521 m.mu.RLock()
522 names := make([]string, 0, len(m.instances))
523 for name := range m.instances {
524 names = append(names, name)
525 }
526 m.mu.RUnlock()
527
528 for _, name := range names {
529 m.Stop(name)
530 }
531
532 // Wait for all loops to finish
533 m.wg.Wait()
534}
535
536// IsAnyRunning returns true if any loop is currently running.
537func (m *Manager) IsAnyRunning() bool {

Callers 2

TestManagerStopAllFunction · 0.95
stopAllLoopsMethod · 0.80

Calls 1

StopMethod · 0.95

Tested by 1

TestManagerStopAllFunction · 0.76