Re: Terminate running script thread

2021-02-27 Thread Remi Forax
- Mail original - > De: "Attila Szegedi" > À: "Viktor Remennik" > Cc: "nashorn-dev" > Envoyé: Samedi 27 Février 2021 18:07:55 > Objet: Re: Terminate running script thread Hi, > No, there’s no support for that. Nashorn compiles all

Re: Terminate running script thread

2021-02-27 Thread Attila Szegedi
Thanks, by all means report back with what you found :-) Attila. > On 2021. Feb 27., at 18:59, Viktor Remennik wrote: > > I didn’t checked it yet, just wanted to ask first. It is implemented in > graal, will look there to check how. The first idea i thought, was to inject > some global var ch

Re: Terminate running script thread

2021-02-27 Thread Viktor Remennik
I didn’t checked it yet, just wanted to ask first. It is implemented in graal, will look there to check how. The first idea i thought, was to inject some global var checking in loops, but i am not a big specialist in that area yet. Will study it further then, thank you! Kind regards, Viktor >

Re: Terminate running script thread

2021-02-27 Thread Attila Szegedi
No, there’s no support for that. Nashorn compiles all scripts to JVM bytecode and runs them as such. There’s no more of a way to stop that code than any Java code. Even if there was some other way, I don’t see how would stopping a thread be materially better than what Thread#stop provides. I’m n