Skip to content
EntityQ1339231· pop 18· linked from 95 articles

Also 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
Sources (1)

via Wikidata · CC0

~25 min read

Article

37 sections
Contents
  • 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".

Connections

Categories