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

Method Stop

internal/loop/loop.go:500–509  ·  view source on GitHub ↗

Stop terminates the current agent process and stops the loop.

()

Source from the content-addressed store, hash-verified

498
499// Stop terminates the current agent process and stops the loop.
500func (l *Loop) Stop() {
501 l.mu.Lock()
502 defer l.mu.Unlock()
503
504 l.stopped = true
505
506 if l.agentCmd != nil && l.agentCmd.Process != nil {
507 l.agentCmd.Process.Kill()
508 }
509}
510
511// Pause sets the pause flag. The loop will stop after the current iteration completes.
512func (l *Loop) Pause() {

Callers 4

TestLoop_StopFunction · 0.95
stopLoopForPRDMethod · 0.45
stopWatcherMethod · 0.45
runWatchdogMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestLoop_StopFunction · 0.76