paulbartrum / jurassic

A .NET library to parse and execute JavaScript code.
MIT License
874 stars 121 forks source link

Loop statements mid-execution handles #41

Open smoketh opened 8 years ago

smoketh commented 8 years ago

HI, there. I am writing a hacking game somewhat based on your marvelous framework right now. In that game (netbreakers is working title) users run a virtual terminal and can launch programs which are basically javascript files, memory file system is already setup and running and everything seems fine. However, because of the nature of the game (i am using internal classes to run multiple engines and their instances) I am pretty damn certain that smart-arse (and inexperienced) users will hang the game just by creating while(true) {} (or for(;;) loops which will hang execution if they not contain some sort of break or sleep statement. So, i have a question. Is there a quick way to force loop statements to pause from software side and not from the user side? say, some automatic analysis which can pass handle to resume execution to a c# code once a loop statement reaches it's looping point?

paulbartrum commented 8 years ago

I'm assuming this issue is made obsolete by the referenced issue?