Module system strawpersons

Oliver Hunt oliver at apple.com
Mon Jan 18 17:43:52 PST 2010


On Jan 18, 2010, at 5:41 PM, Brendan Eich wrote:

> On Jan 18, 2010, at 5:20 PM, ihab.awad at gmail.com wrote:
> 
>> On Mon, Jan 18, 2010 at 4:54 PM, Brendan Eich <brendan at mozilla.com> wrote:
>>> That's right -- no races, execution still seems single-threaded. Wherefore
>>> the special form, although if this line is in a seldom-executed branch you
>>> still have the hit of loading B up front.
>> 
>> Right. The optimization in this case is that the runtime could delay
>> loading B and, if B is encountered, *block* the currently running
>> event loop and fetch B.
> 
> So the spec is that import could nest an event loop? What scripts or event handlers/timeouts/etc. could run at that point? In general breaking the run-to-completion execution model means the importing script and its containing window could be destroyed, a zombie.

It's also horrific in the context of a browser as it's effectively an arbitrary length call blocked on IO.

--Oliver

> 
> /be
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



More information about the es-discuss mailing list