Hi,
I've got code as follows in js:
while (true) { native_sleep(1000); }
Effectively js keeps leaving and re-entering native code repeatedly without affecting it's own stack. I noticed that in a situation like this TerminateExecution simply does not work.
If I change my code to:
func js_sleep(arg) { native_sleep(arg); }
while (true) { js_sleep(1000); }
Then it works, but this adds an unnecessary js stackframe, which for a tight rendering loop might not be great.
Is there a way to propagate termination without an extra js frame somehow?
I.e., could the termination checks be done when entering/leaving native calls?
Can I somehow force the propagation to kick in once I'm leaving my native call?
Thanks.