Coroutines Implementations

Discussions center on coroutines, comparing stackless and stackful implementations, continuations, and their use across languages like C++, Go, Rust, Kotlin, Lua, and others.

📉 Falling 0.5x Programming Languages
3,332
Comments
20
Years Active
5
Top Authors
#1546
Topic ID

Activity Over Time

2007
3
2008
29
2009
70
2010
116
2011
97
2012
109
2013
174
2014
127
2015
155
2016
192
2017
222
2018
218
2019
218
2020
229
2021
263
2022
174
2023
379
2024
310
2025
241
2026
6

Keywords

IteratorResult livejournal.com e.g CPU JMP GOTO OK CPS profiling.md JavaScript coroutines implementation async generators stack python stacks tradeoffs state machines yield

Sample Comments

mratsim • Sep 1, 2023 • View on HN

Or provide continuations and use them to implement coroutines.

oecumena • Oct 8, 2022 • View on HN

A simple experimental implementation of coroutines alternative to well-known "stackless" and "stackful" methods.

How does this compare to Kotlin coroutines/continuations ?

tuukkah • Nov 11, 2018 • View on HN

Cheap-enough coroutines seem to be new in C++ but what about other languages such as Go, Rust, Haskell?

brenns10 • May 24, 2020 • View on HN

That's really cool, and much lighter weight for the purpose of coroutines!

Skunkleton • Dec 18, 2018 • View on HN

Further evidence: coroutines are often implemented as state machines under the hood.

richcollins • Sep 15, 2012 • View on HN

You should look at LuaJIT's coroutines as an option.

ptr • Jun 22, 2023 • View on HN

Coroutines are an abstraction though.

qwertyuiop924 • Jul 19, 2016 • View on HN

Oh, only co-routines? So you've implemented callcc already?

ameliaquining • Sep 19, 2023 • View on HN

Can you explain what makes C++ coroutines work better than Rust futures?