RE: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-10 Thread Tracy Spratt
[mailto:[EMAIL PROTECTED] On Behalf Of robbarreca Sent: Monday, June 09, 2008 5:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Attaching custom data to events (while avoiding race condition) So when I say thread maybe I'm using the wrong terminology. I'm not actually talking about

Re: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Daniel Gold
It makes sense when dealing with concurrent programming, but Flash is single threaded and you won't have a case where multiple threads are task switching and simultaneously executing functions. Every function call and event handler in flex is basically in-lined and will execute to completion. On

Re: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Josh McDonald
If you need responses to come back in order, don't make the second request until you've got the first result. Or wait for all responses, and put them in an array based on some order-information in the AsyncTokens. -Josh On Tue, Jun 10, 2008 at 11:48 AM, robbarreca [EMAIL PROTECTED] wrote:

Re: [flexcoders] Re: Attaching custom data to events (while avoiding race condition)

2008-06-09 Thread Daniel Gold
I think the piece that you were missing is that load is actually pulling data in from a service, and you can't rely on the order in which the service responses return. Josh's answer above is definitely a best practice, if you have multiple service calls that need to have responses handled in a