David Bruant (2013-08-13T00:43:10.000Z)
domenic at domenicdenicola.com (2013-08-19T04:40:14.960Z)
Le 13/08/2013 01:58, David Herman a écrit : > On Aug 8, 2013, at 2:08 PM, K. Gadd <kg at luminance.org> 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 (https://mail.mozilla.org/pipermail/es-discuss/2013-August/032622.html). I suggested something else (https://mail.mozilla.org/pipermail/es-discuss/2013-August/032630.html) and he found the idea interesting. What do you think?