Is there a way to stop eval script?
I want to stop a running script and eval a new one, is there a way?
I do not expose any methods to do that, no. The only way I can think to do it is to kill the running pthread. Any reason why you want to stop a running script? JS isn't really designed to handle long running processes. If your script is getting stuck due to the 2.1 bug that is causing deadlocking, I suggest two things: (1) send me your failing JS and let me debug the problem -- I do not yet have a test case I can use to debug 2.1, and (2) revert to version 2.0 until a patch has been deployed.
I have created a 2.2 pre-release which should help with the stability issues. Please re-open if this doesn't help.
Hi Eric,
Thank you for AndroidJSCore! I'm using it for an Android application that uses Blockly to control a bluetooth connected robot (see github.com/tharvey/BlocklyBot and https://robotstem.wordpress.com/).
In my use case the javascript may loop forever waiting for external event handlers which I hook into the code, so I very much find use in stopping the script. Is this something you can add or point me to where I might do it? If killing the thread is the way to go can you give me some pointers? I'm still coming up to speed on Android app development.
Regards,
Tim