[whatwg] Workers feedback

Shannon shannon at arc.net.au
Sun Nov 16 02:56:31 PST 2008


Ian Hickson wrote:
> On Fri, 14 Nov 2008, Shannon wrote:
>   
>> I don't see any value in the "user-agent specified amount of time" delay 
>> in stopping scripts. How can you write cleanup code when you have no 
>> consistency in how long it gets to run (or if it runs at all)?
>>     
>
> The "user-agent specified amount of time" delay is implemented by every 
> major browser for every script they run today.
>
> How can people write clean code when they have no consistency in how long 
> their scripts will run (or if they will run at all)?
>
> Why is this any different?
>
>   
Why does that matter? I think you're asking the wrong question. As
designers of a new spec the question should be "how can we fix this?".
If the answer is to include a mandatory cleanup window for ALL scripts
then that should be considered (even if that window is 0 seconds).

>> If you can't rely on a cleanup then it becomes necessary to have some 
>> kind of repair/validation sequence run on the data next time it is 
>> accessed to check if it's valid.
>>     
>
> You need to do that anyway to handle powerouts and crashes.
>   
That was the point of my concern. Given that the only 100% reliable
cleanup window is 0 seconds it would be more consistent (and honest) to
make that the spec. Offering a cleanup window of uncertain length is
somewhat pointless and bound to cause incompatibilities across UAs. Is
there a strong argument against making 0 seconds mandatory, given that
anything else is inconsistent across UA, architecture and circumstance?

> It's not clear which document the cookie would be for. localStorage is 
> as light-weight than cookies (lighter-weight, arguably), though, so that 
> should be enough, no?
>
>   
Fair enough.


Shannon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081116/c2e393d3/attachment-0001.htm>


More information about the whatwg mailing list