Re: Race conditions in HTML 5?

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 UTC