Concurrency support?

Graydon Hoare graydon at mozilla.com
Mon Jun 26 22:49:11 PDT 2006


Brendan Eich wrote:

>> That seems unlikely since the same restriction probably applies to PEP 
>> 324 yields.
> 
> No, it doesn't.  There is no yield across more than one level of call.

Oh. Somehow I was picturing a C python extension calling back into
python, and trying to suspend itself in order to yield back to its
caller. I guess they can just "not do that in an extension"; doesn't
affect the python code on either side.

In any case, consider our two options:

   1. copying python: "no yield across more than one level of call"
   2. copying lua: "no yield across a language barrier"

We have a putative concept of "language barrier" in ES4 already: methods
marked as 'native'. We could easily adopt #2. I claim that #2 is a much
less severe restriction than #1, and gives the users (who mainly write
100% script) much more power.

Aside from the painful fact that we've already implemented something
more like #1, is this really so unreasonable?

-graydon





More information about the Es4-discuss mailing list