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

[whatwg] Race condition in media load algorithm

From: Chris Pearce <chris@pearce.org.nz>
Date: Wed, 04 Aug 2010 11:18:00 +1200
Message-ID: <4C58A3A8.9090504@pearce.org.nz>
  On 3/08/2010 9:20 a.m., Ian Hickson wrote:
>
> The synchronous section would run as soon as the task span the event loop.
> Spinning the event loop is defined essentially as being equivalent to
> breaking the original task in two, one that does everything up to spinning
> the event loop, and one that does everything after spinning the event
> loop. You are effectively waiting for some condition to become true and
> then queueing a task to run the continuation of the algorithm. It's just
> more convenient to write the algorithms as one long set of steps rather
> than having split them up into multiple algorithms that invoke each other
> and pass state around.
>
>> Or does "stop the currently running task" in #spin-the-event-loop imply
>> a jump to step 2 of the algorithm under #processing-model2?
> Yes.
>

So the task spinning the event loop has run up to the point of spinning 
the event loop, then we run the synchronous section, and then the task 
which was spinning the event loop will resume after its goal is met at 
some later time?

In the case of a tasks which invokes an algorithm which has a 
synchronous section, and then pauses the event loop (such calling 
window.alert()), we should not run the synchronous section until the 
event loop pause has completed?

Thanks,
Chris Pearce.
Received on Tuesday, 3 August 2010 16:18:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:59 UTC