()
| 97 | } |
| 98 | |
| 99 | func (jsw *JSWorker) Stop() (err error) { |
| 100 | if jsw.process != nil { |
| 101 | jsw.process.Kill() |
| 102 | jsw.process = nil |
| 103 | } |
| 104 | jsw.stdin = nil |
| 105 | jsw.stdout = nil |
| 106 | jsw.outReader = nil |
| 107 | if jsw.debug { |
| 108 | fmt.Println(term.Dim(fmt.Sprintf("[debug] js worker stopped (runtime: %s)", jsw.script))) |
| 109 | } |
| 110 | return |
| 111 | } |
| 112 | |
| 113 | func (jsw *JSWorker) Call(args ...any) (format string, output string, err error) { |
| 114 | // only one load call can be invoked at a time |
no outgoing calls
no test coverage detected