On 8/2/10 3:11 PM, Ian Hickson wrote:
How are we defining "current asynchronous task" and "finish"?

In terms of the event loop algorithm:

    
http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#processing-model-2

Ah, I see. Is the note there about synchronous sections having no side-effects something that is true by default due to the way synchronous sections are used in the specification?

How does this setup handle cases when the "current asynchronous task"
spins the event loop, if at all?

The spinning of the event loop is also defined in terms of the event loop
in a manner that strictly defines this:

    
http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#spin-the-event-loop

I'm not sure I follow the steps here, actually. Just to make sure I do understand....

Say I have a task T in the event queue. Task T begins some algorithm that has a synchronous section, then spins the event loop. If I understand the steps in #processing-model-2 correctly, the synchronous sections would run after task T completes, not while task T is spinning the event loop? Or does "stop the currently running task" in #spin-the-event-loop imply a jump to step 2 of the algorithm under #processing-model2?

(Note: I still have a problem with the way "pause" is defined here, but I've raised that before, I believe.)

-Boris

Reply via email to