Fwd: "delay" keyword
brendan at mozilla.org
Thu Jul 5 11:20:03 PDT 2012
You do realize this works in Firefox via a *nested* event loop. Not a
coroutine or green thread under the hood, by which other events flow in
the outer loop?
That makes it a bug, and I am willing to bet real money no other engine
will adopt it as a feature.
Patrik Stutz wrote:
> NICE! Exactly like I requested it :P
> I also think that this isn't a Bug. It's far to good to be a bug. Such
> complex things (as you told me it is) like stack pausing/resuming not
> just are there by accident.
> It would be really interesting to know what the guys of the V8-Engine
> think about this.
> 2012/7/5 Jussi Kalliokoski <jussi.kalliokoski at gmail.com
> <mailto:jussi.kalliokoski at gmail.com>>
> On Thu, Jul 5, 2012 at 8:50 PM, Brendan Eich <brendan at mozilla.org
> <mailto:brendan at mozilla.org>> wrote:
> Jussi Kalliokoski wrote:
> Ok, here's the relevant blog post I mentioned writing:
> <http://blog.avd.io/posts/js-green-threads> . You can
> discuss / give feedback here or on HackerNews:
> http://news.ycombinator.com/item?id=4203749 .
> Seems like a bug in Firefox, a violation of HTML5 even. The
> slow script dialog should not allow an event loop to nest.
> Cc'ing Boris for his opinion (this may be a known bug on file,
> my memory dims with age).
> I don't think it's a bug, it seems to meaningful since all the
> blocking calls have this behaviour. Looks like SM has stack
> pausing / continuing in place as well; why, if not for this? Seems
> reasonable to me. But if it's a bug, I'm extremely sorry I haven't
> filed it, I didn't think it was a bug when I discovered it around Fx8.
> Chrome doesn't run onmessage when I continue ("Wait") the
> Kill-or-Wait sad tab dialog. Safari and Opera (12) seem not to
> put up a slow script dialog, but perhaps I was impatient (I
> wanted a minute or so).
> Yes, this is Firefox-specific. I've tested all other browsers at
> my disposal and they don't have this behavior. Seems like a good
> idea adding it though, could make the browsers a lot more
> responsive regardless of a few bad websites, and I don't think
> those websites would break horribly because of this.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss