Are Python coroutines stackless or stackful?

Viewed 408

I've seen conflicting views on whether Python coroutines (I primarily mean async/await) are stackless or stackful.

Some sources say they're stackful:

While others seem to imply they're stackless, e.g. https://gamelisp.rs/reference/coroutines.html

GameLisp's coroutines follow the model set by Rust, Python, C# and C++. Our coroutines are "stackless"

In general my understanding always was that any meaningful async/await implementation implies stackless coroutines, while stackful ones are basically fibers (userspace threads, often switched more or less cooperatively), like goroutines, Boost.Coroutine, apparently those in Lua etc.

Is my understanding correct? Or do Python coroutines somehow fundamentally differ from those in say C++, and are stackful? Or do the authors of the source above mean different things?

0 Answers
Related