Does it make sense to keep a script (context) running in an 'idle loop' - that is, if it doesn't need to do anything, then Suspend() itself (through a registered function).. and when it needs to do some work, to do that and go back to being idle (how would you even signal it that it needs to do some work.. through a global variable which is shared amongst all contexts of that script module?)? That way that function that you Execute()'d would maintain its local variables (because you keep it running).
Or is it idiomatic for AngelScript to maintain state through global variables?
How should you maintain state? Or is it expected that C++ maintains whatever game state and each time a script function runs, it queries whatever it needs to (through registered functions/objects) in order to gather the necessary variables to do its work?
Thank you.