[Bug 15007] Add an API to queue a task

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15007

--- Comment #15 from Boris Zbarsky <bzbarsky@mit.edu> 2011-12-03 03:29:28 UTC ---
There has been a proposal from Microsoft for something like this.  They're
calling it setImmediate.  That proposal is basically setTimeout without the
clamp, for foreground tabs.  For background tabs there's talk of allowing
clamping setImmediate.

The background tab story is very complicated.  Basically, battery
considerations mean that UAs would like background tabs to use as little CPU as
possible _and_ to have as few wakeups as possible.  This last is needed to
allow the processor to actually go into low-power states.  We didn't completely
turn off setTimeout in background tabs mostly because of compat worries, I
think.  Any API _designed_ to be used to schedule rapid-fire tasks into the
event loop would quite likely just be disabled altogether in background tabs,
at least in Gecko....

That all said, I'd really like to understand what the use cases are here,
especially for background tabs, before we start discussing details of what the
API should look like.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 3 December 2011 03:29:32 UTC