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)
| 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. |
| 192 | func (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 |
| 199 | func (p *Process) ErrIfNotAMethod() error { |