Skip to content

Comment on ES6 Generators Deliver Go Style Concurrency (2013)parent

Comments

When you use Generators for this style of concurrency, generators are comparable to async/await. The difference is that with async/await support, you still have the option for your promises to resolve generators.

Basically by using generators for co-routines, you preclude yourself from some use-cases that generators normally provide.

Generators are not as useful and are more niche. Am I wrong?

I would say that generators are more general, and async/await actually more specific to a single use-case.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.