Fwd: Reason why generators do not have references to themselves?
brendan at mozilla.com
Fri Jan 24 15:48:13 PST 2014
Bradley Meck wrote:
> Perhaps, but I am still a bit concerned functionality wise that I do
> not have a clean way to force the `new generator()` piece of code to
> be inside of the generator.
I think you've gone down a bad path. Even without task.js, couldn't you
put the promises .then'ing in the generator schedule, instead of
requiring each generator to open-code the .then/.catches, which in turn
requires you to have a ref to the generator?
More information about the es-discuss