ActionScript: When are event handlers executed?
When, in ActionScript, an event is dispatched:

    foo.addEventListener("some event", someHandler);
    foo.dispatchEvent(new Event("some event"));

At what point are the event handlers executed?

I ask because I caught this at the end of an [Adobe developer guide](http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=rpc_httpws_08.html):

> Notice that some properties are assigned to the [AsyncToken] after the call to the remote service is made. In a multi-threaded language, there would be a race condition where the result comes back before the token is assigned. **This situation is not a problem in ActionScript because the remote call cannot be initiated until the currently executing code finishes**.

But I could not find any information on what they meant by "currently executing code".
ActionScript: When are event handlers executed?
===

When, in ActionScript, an event is dispatched:

    foo.addEventListener("some event", someHandler);
    foo.dispatchEvent(new Event("some event"));

At what point are the event handlers executed?

I ask because I caught this at the end of an [Adobe developer guide](http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=rpc_httpws_08.html):

> Notice that some properties are assigned to the [AsyncToken] after the call to the remote service is made. In a multi-threaded language, there would be a race condition where the result comes back before the token is assigned. **This situation is not a problem in ActionScript because the remote call cannot be initiated until the currently executing code finishes**.

But I could not find any information on what they meant by "currently executing code".