I'm trying to understand when a remote method invocation will occur
during the execution of an action script method. What I've read so
far indicates that it's safe to annotate the PendingCall object
returned from the invocation because the invocation [I think it is:]
won't occur until the calling method has returned. 

What I am not clear on is whether it's when the immediately executing
method returns, or when the entire method invocation stack returns to
the UI event listener loop. Here's an example with numerical time
points for illustration:

1: button press happens
2: click handler 'clickHandler' is invoked
3: clickHandler calls 'doRemoteInvocation'
4: doRemoteInvocation calls 'invokeRemote1'
5: invokeRemote1 invokes the actual remote method, decorates the 
PendingCall returned object
6: invokeRemote1 returns
7: doRemoteInvocation then calls 'invokeRemote2'
8: invokeRemote2 invokes the actual remote method (not the same method
that invokeRemote1 invoked), decorates PendingCall object
9: invokeRemote2 returns
10: doRemoteInvocation returns
11: clickHandler returns
12: button click pressing completes

What I am guessing happens (based on the statement that there's pretty
much only 1 thread running in Flex) is that only at time 12 or after
do the actual remote method invocations occur. The documentation that
I have read sort of seems like the remote invocations happen at 6 and
9. I'd like to be able to count on them not happening until after 10
at least.... 

Any help would be greatly appreciated!!!



Reply via email to