coroutine
Sign in to saveAlso known as Coroutines
Coroutines are computer program components that allow execution to be suspended and resumed, generalizing subroutines for cooperative multitasking. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes.
Wikidata facts
Show 1 more fact
- Stack Exchange tag
- stackoverflow.com/tags/coroutine
Sources (1)
via Wikidata · CC0
~25 min read
Article
37 sectionsContents
- Definition and types
- Comparisons
- Subroutines
- Threads
- Generators
- Mutual recursion
- Common uses
- Native support
- Implementations
- C
- C++
- C#
- Clojure
- D
- Go
- Java
- JavaScript
- Kotlin
- Lua
- Modula-2
- Mono
- .NET Framework
- OCaml
- Perl
- PHP
- Python
- Racket
- Ruby
- Scheme
- Smalltalk
- Tcl
- Vala
- Assembly languages
- See also
- References
- Further reading
- External links
Coroutines are computer program components that allow execution to be suspended and resumed, generalizing subroutines for cooperative multitasking. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes.
They have been described as "functions whose execution you can pause".