Thanks a lot Wesley, you confirmed my suspicion. I exaggerated my example to emphasise my point, its not that crazy in my app :) Never heard of pseudo threading before, googled some good resources, thanks for pointing me in a direction.
Baz On Wed, Aug 12, 2009 at 3:35 PM, Wesley Acheson <[email protected]>wrote: > > > Short answer no. I'm not sure If thats a good thing in your use case or > not. > > Basically flex is single threaded so the events only get processed after > the loop finishes. > > If you need it to be otherwise you have to break out of the loop. The > other problem with doing a 100000 iterations is that you have basically made > the user interface unresponsive while the loop is iterating. I would think > about breaking it down with a psuedo thread but that will give you problems > with the checkbox if you want them to all be processed concurrently. > > Regards, > Wes > > > On Wed, Aug 12, 2009 at 11:58 PM, Baz <[email protected]> wrote: > >> >> >> If I have a FOR loop that dispatches events, is it possible that those >> events will be acted on before the loop finishes? For example: >> >> FOR LOOP BEGIN 100000 ITERATIONS >> DISPATCH EVENT TO CHECK A CHECKBOX >> FOR LOOP END >> >> In the previous pseudo code, lets say the logic in each iteration is very >> long and complex, is it possible that some checkboxes get checked before all >> 100000 iterations are complete? >> >> Cheers. >> >> >> >> > >

