RE: setImmediate usage on the web

The setImmediate spec does not sufficiently explain that it is intended NOT to run in that situation. If IE/Microsoft Edge are tested, this can be observed.

I've added some comments and issues to the GitHub repo to ensure that clearly important processing model information is reflected here:
https://github.com/w3c/setImmediate


-Todd

-----Original Message-----
From: Boris Zbarsky [mailto:bzbarsky@mit.edu] 
Sent: Wednesday, June 24, 2015 3:52 PM
To: public-web-perf@w3.org
Subject: Re: setImmediate usage on the web

On 6/24/15 3:42 PM, Tobin Titus wrote:
> Ross, with regards to requestIdleCallback 
> <https://docs.google.com/document/d/1ZgYOBi_39-N6AbjL99qesiDagaSTbpN0R

> 6CrSVK8NE4/edit#heading=h.lobhanl56igp>,
> I’m happy to be corrected, but I feel like requestIdleCallback is 
> setImmediate with an “best guess” at the idle time provided to the 
> callback.

No, because they have very different behavior in terms of when the callback runs.  setImmediate callbacks can run even if there is other stuff the browser wants to do instead; requestIdleCallback callbacks won't run in that situation.

-Boris

Received on Wednesday, 24 June 2015 23:10:17 UTC