jmar777 at gmail.com
Thu May 14 14:52:56 UTC 2015
Hey (author of suspend here): this post was an earlier attempt I had an
explaining some of the concepts involved:
It covers some of the basics, like, what iterators are, how generators
relate to iterators, how generators enable "suspended" execution within the
context of run-to-completion semantics; etc. Hope it helps!
On Thu, May 14, 2015 at 10:47 AM, Jason Orendorff <jason.orendorff at gmail.com
> On Thu, May 14, 2015 at 2:05 AM, <Mohan.Radhakrishnan at cognizant.com>
> > Thanks. What is the underlying concurrency framework when we use
> > for concurrent workloads ? Does it depend on the particular VM ?
> Generators aren't for concurrency.
> When a generator runs, it runs in the same thread as the caller. The
> order of execution is sequential and deterministic, and never
> concurrent. Unlike system threads, a generator is only ever suspended
> at points marked by yield in its body.
> (copied from <https://hacks.mozilla.org/2015/05/es6-in-depth-generators/>)
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss