> Are there any resources that describe the internals of the Flash player? > Is there a spec like there is for the Java runtime?
Unfortunately, no. About the closest thing is a spec for the SWF file format. But that spec doesn't really explain how the Player loads and executes a SWF file. - Gordon From: [email protected] [mailto:[email protected]] On Behalf Of Alex Harui Sent: Thursday, August 27, 2009 3:55 PM To: [email protected] Subject: RE: [flexcoders] Race conditions when event handlers triggered from different targets Because actionscript is single-threaded, your scenario cannot happen. Alex Harui Flex SDK Developer Adobe Systems Inc. Blog: http://blogs.adobe.com/aharui -----Original Message----- From: [email protected]<mailto:flexcoders%40yahoogroups.com> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On Behalf Of Jon Gunnip Sent: Thursday, August 27, 2009 1:49 PM To: [email protected]<mailto:flexcoders%40yahoogroups.com> Subject: Re: [flexcoders] Race conditions when event handlers triggered from different targets 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]<mailto:tracy%40nts3rd.com>> 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:flexcoders%40yahoogroups.com> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On > Behalf Of Jon Gunnip > Sent: Thursday, August 27, 2009 10:04 AM > To: [email protected]<mailto:flexcoders%40yahoogroups.com> > 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

