W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Race condition in media load algorithm

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 02 Aug 2010 15:39:34 -0400
Message-ID: <4C571EF6.5010206@mit.edu>
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 

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 

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

Received on Monday, 2 August 2010 12:39:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:25 UTC