(pid int)
| 175 | } |
| 176 | |
| 177 | func (e *Engine) getProcessFast(pid int) *process.Process { |
| 178 | e.mu.RLock() |
| 179 | defer e.mu.RUnlock() |
| 180 | if p, ok := e.processes[pid]; ok { |
| 181 | return p |
| 182 | } |
| 183 | if p, ok := e.threads[pid]; ok { |
| 184 | return p |
| 185 | } |
| 186 | return nil |
| 187 | } |
| 188 | |
| 189 | func (e *Engine) getProcess(pid int) *process.Process { |
| 190 | if p := e.getProcessFast(pid); p != nil { |