Re: [ScriptYielding] setImmediate clamping returns.

On Tue, 13 Aug 2013, David Bruant wrote:
>
> Their response was to align to what other browsers were doing which was to
> reinterpret "0" as something a bit higher (10ms at the time).
> 10ms was later changed to 4ms and only for deeply-nested setTimeouts (so,
> setTimeout(f,0) really means 0 until you've done it 4 times in a row after
> which there is the minimum 4ms delay).

Note that the delay starts from when you call setTimeout(). If you 
schedule a timeout, do 4ms' worth of work, and then yield, the next 
timeout will happen straight away (modulo the browser dealing with any UI 
events, and so on -- so it won't starve the other task sources), 
regardless of how deeply nested your timeouts are.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 14 August 2013 00:33:42 UTC