Thanks, Tracy. I'm not principally concerned with knowing when two
operations have completed. I'm more concerned about checking the
status of a global variable in event handler A' and then having that
variable's value changed by event handler B' before A' is finished
executing.  In Java you might use a synchronized block for this.  I
was hoping the flash player might make some guarantees that make a
concern like this unnecessary, especially since it executes in a
single thread.

Are there any resources that describe the internals of the Flash
player?  Is there a spec like there is for the Java runtime?

Thanks,
Jon

On Thu, Aug 27, 2009 at 12:44 PM, Tracy Spratt<[email protected]> wrote:
>
>
> You can’t predict order, but you can be assured that there is no parallel
> processing of actionscript code.  I don’t know the internals of the flash
> player well enough to say in detail but there are rules that control what
> code is processed when.
>
>
>
> If you need to know that two async processes have completed, use a flag or
> dictionary, set a flag value in each handler, and check it in each handler.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> ________________________________
>
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Jon Gunnip
> Sent: Thursday, August 27, 2009 10:04 AM
> To: [email protected]
> Subject: [flexcoders] Race conditions when event handlers triggered from
> different targets
>
>
>
>
>
> Hi,
>
> I have a concern about possible race conditions in our Flex
> application. I've read in "Essential ActionScript 3.0" that the Flash
> runtime will not interrupt the execution of an event handler to update
> the screen. I'm wondering if there are any similar guarantees about
> the order in which two event handlers registered with different
> targets are executed. Consider the following:
>
> User presses button A triggering event handler A'
> In same frame, result returned from HTTPService B, triggering event handler
> B'
>
> If A' starts executing before B', will it run to completion before B'
> starts executing, or could their execution be interleaved?
>
> Thanks,
> Jon
>
> 


------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: 
https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to