dop251 / goja

ECMAScript/JavaScript engine in pure Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run javascript long time

limes-cloud opened this issue · comments

commented

`
js.RunString("while(true){}")

`

The code will always block.How to deal with this situation

For example, with a timeout:

timer := time.AfterFunc(10*time.Minute, func() {
  vm.Interrupt("Timeout")
})

https://github.com/dop251/goja#interrupting