Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Used for questions involving coroutine functionality; either from the language itself, provided by an external library, or when the code in question implements coroutines itself.

Coroutines are similar to ordinary functions, however whereas functions only return once, coroutines can be suspended and resumed multiple times. They can also yield values multiple times.

Coroutines can be building blocks for other language features, such as generators and async-await. Coroutines may or may not have their own stack, and may or may not run in their own threads.

See also:, , .