thekryptonian wrote:Has any thought been givento multithreading the scripting in Celestia? This would get rid of the frame halts and the arbitrary run period aborts - frame rates would be much smoother, and a lot of the current limitations on scripting would be lifted.
For many applications you need to keep control over the work done without interruption by frame-rendering.
If you get "frame halts" (I guess you mean noticeable delays during rendering) or script termination due to exceeding the maximum timeslice, then the script is wrong. It should contain more wait() commands. For long-running loops you can check how much time has passed since the last wait, and call wait once every 0.1s (i.e. don't call wait every time, this would ruin the performance of the loop).
BTW, what limitations do you think would be lifted by this?
What critical issues would arise? How tightly bound to the Celestia engine itself is the scripting language?
Lua itself doesn't allow simulating multithreading, and real multithreading (if it is actually possible in Lua - I doubt it) isn't even used by Celestia itself, so multithreading isn't an option for pure technical reasons at this time. Any interruption to the execution of the script has to be initiated by the script itself... even the termination when exceeding the maximum timeslice is a hack.
Harald