Re: [GD-General] Scripting Systems
Brought to you by:
vexxed72
From: Alen L. <ale...@cr...> - 2004-01-21 11:22:10
|
----- Original Message ----- From: "Dan Thompson" <da...@ar...> > This method is vs. just running a script and creating the stack when the > message comes in. This seemed far too expensive, as you could be creating > script stacks all over the place, and it also runs into the problem where > the game locks because the scripts are being run in the same thread. AFAIK, one usual method is to make sure that all "yields" are always on the bottom of the stack so you don't need to keep and store stack for each script. This of course rules out real preemptiveness. But... how do you handle that anyway? Don't you ever get problems with one script being interrupted in the middle of modifying some object and another one accessing that same object in a half-valid state? And having scripts running on a different thread? Do you use some synchronizations when accessing other subsystems from scripts? Alen |