David Bruant bruant.d at
Mon Aug 12 17:43:10 PDT 2013

Le 13/08/2013 01:58, David Herman a écrit :
> On Aug 8, 2013, at 2:08 PM, K. Gadd <kg at> wrote:
>> Why is the slow script dialog box even relevant for setImmediate? As I understand it, setImmediate is equivalent to DoEvents in Visual Basic/Windows Forms and pumping the message loop in a normal C application. That is, you can use setImmediate to make your application run as fast as possible while still allowing the browser to pump messages, which ensures keyboard/mouse inputs are processed and the window does not get flagged as unresponsive.
> Yeah, I'm actually not at all clear which of (at least?) four plausible semantics could be meant by setImmediate:
> (a) push a new microtask (to the front of the current microtask list)
> (b) enqueue a new microtask (to the back of the current microtask list)
> (c) push a new event (to the front of the event queue)
> (d) enqueue a new event (to the back of the event queue)
> I'd always assumed it meant (d)
Yes, this is (d). I think I'm partially responsible for side-tracking 
the discussion to talk about microtasks. Sorry about that.

> - I see *no* reasonable alternative to runaway microtask churn other than slow-script dialog.
So did Dominic [1]. I suggested something else [2] and he found the idea 
interesting. What do you think?



More information about the es-discuss mailing list