virtual threading?
I've got a function like this:
private function stopGame():void
{
save();
clear();
}
I'm pretty sure that if save() takes 10 seconds and clear() takes 5, some things might be cleared before they are saved.
But if those functions are chained together...
private function stopGame():void
{
save();
}
private function save():void
{
for (i = 0; i < numGameObjects; i++){//save a game object}
clear();
}
private function clear():void
{
for (i = 0; i < numGameObjects; i++){//clear a game object}
}
...is it possible that the loop in save() is still executing while clear() is called?
In other words, are the lines of code within a function executed procedurally, one after the other? Does Flex wait for the loop to complete before calling clear()?
|