The service is invoked asynchronously so Flex just invokes the send and keeps 
executing.

Unless the call to the service and its response is faster than the computer 
executing (read "will never happen") then the responder will be added before 
the call returns.



--- In flexcoders@yahoogroups.com, "Mehdi" <elextra...@...> wrote:
>
> This is a question that has been bothered me for some time. 
> You know how in Flex you can invoke a service (say httpservice for instance) 
> which returns a token. After that you set the responder on the token. I.e.:
> 
> var asyncToken:ASyncToken = httpsrv.send();
> asyncToken.addResponder(...)
> 
> We set the responder/handler AFTER the call has been set. Its very awkward 
> but it does work. I was hoping someone could explain this to me. Thank you.
> 
> Flex being single threaded, the call to httpsrv.send() should actually 
> invokes the server and not get into the second line about the responder until 
> the call has been at least issued. 
> But that's not how it works I guess. So, I am assuming the call is queued 
> somewhere, until....until when???
> 
> Cheers
>


Reply via email to