W3C home > Mailing lists > Public > public-html@w3.org > June 2008

Re: Race conditions in HTML 5?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 10 Jun 2008 18:30:09 -0500
Message-ID: <484F0E81.9080604@mit.edu>
To: "Bonner, Matt" <matt.bonner@hp.com>
CC: "public-html@w3.org" <public-html@w3.org>

Bonner, Matt wrote:
> If the boolean in function A() can't change, and it's waiting for a
> script that won't start until A() stops, then you have deadlock.

My point was that it's a guaranteed deadlock, independent of any other code or 
any timing issues, not a "sometimes this will deadlock".  If you ever write code 
like that, and if it's entered, your script will "deadlock" (until the UA puts 
up their "do you want to kill this script?" prompt and the user kills it).

> Worse still, if the author tested locally, and on browsers, 
> script B() always executed before A(), the author will think her
> page is ready to deploy.

I assume you're talking about the race condition issue here; as I said earlier I 
agree (and it seems so does everyone else) that this will need to be specified, 
though there can of course still be variation if you add a whole bunch of 
<script>s to the DOM at once, depending on network conditions.

-Boris
Received on Tuesday, 10 June 2008 23:31:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:18 GMT