Is there already a way to terminate a running script? I found some old 
discussions and articles regarding it, is there any progress these days? It 
would be great to have something like CompiledScript#stop or something like 
interrupt handler inside the Nashorn eval, because currently I have to use 
Thread#stop with all its disadvantages and problems. I have user defined 
scripts running in my application, users are technicians but still could make a 
mistakes, so I'd like to control the script execution time and kill scripts 
threads if configured maximum execution time limit has been exceeded. As 
Nashorn is standalone now, I suppose I, or maybe someone more experienced in 
Nashorn's internals, could try to implement this, but I'd like to check first, 
isn't it is already implemented.

https://stackoverflow.com/questions/24855182/interrupt-java-thread-running-nashorn-script
 
<https://stackoverflow.com/questions/24855182/interrupt-java-thread-running-nashorn-script>
http://blog.getsandbox.com/2018/01/15/nashorn-interupt/ 
<http://blog.getsandbox.com/2018/01/15/nashorn-interupt/>


Thank you

Viktor

Reply via email to