MCPcopy
hub / github.com/lmorg/murex / SetTerminatedState

Method SetTerminatedState

lang/process_structs.go:192–196  ·  view source on GitHub ↗

SetTerminatedState sets the process terminated state. This is a function because terminated state can be subject to race conditions so we need a mutex to make the state thread safe.

(state bool)

Source from the content-addressed store, hash-verified

190// This is a function because terminated state can be subject to race conditions
191// so we need a mutex to make the state thread safe.
192func (p *Process) SetTerminatedState(state bool) {
193 p.hasTerminatedM.Lock()
194 p.hasTerminatedV = state
195 p.hasTerminatedM.Unlock()
196}
197
198// ErrIfNotAMethod returns a standard error message for builtins not run as methods
199func (p *Process) ErrIfNotAMethod() error {

Callers 9

runModeNormalFunction · 0.80
runModeTryFunction · 0.80
runModeTryPipeFunction · 0.80
TestJobsGarbageCollectFunction · 0.80
TestJobsListFunction · 0.80
createProcessFunction · 0.80
deregisterProcessFunction · 0.80
ForkMethod · 0.80
ExecuteMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 2

TestJobsGarbageCollectFunction · 0.64
TestJobsListFunction · 0.64