natively negotiating sync vs. async...without callbacks

Mike Shaver mike.shaver at gmail.com
Thu Dec 9 12:45:13 PST 2010


On Thu, Dec 9, 2010 at 12:22 PM, Getify Solutions <getify at gmail.com> wrote:
> 1. I'm not trying to open the can-o'-worms around block level changes. The
> above code suggests that a 'yield' suspension of execution is local to the
> nearest container { } block, in this case the try { } block

No, as implemented in JS1.7, the suspension is of the innermost frame,
not the innermost lexical block.  (You think that it would pause that
block, and then jump to the statement following it, to execute from
there until the yield...yielded?)

https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Iterators_and_Generators
has more.

Mike


More information about the es-discuss mailing list