Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 05-11-2012, 08:00 PM   #1
Senior Member
Join Date: Apr 2009
Posts: 114
Default virtual threading?

I've got a function like this:

private function stopGame():void

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

private function save():void
for (i = 0; i < numGameObjects; i++){//save a game object}

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()?
JeTSpice is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:32 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.