This article's use of external links may not follow Wikipedia's policies or guidelines. (April 2024) |
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".[1]
Melvin Conway coined the term coroutine in 1958 when he applied it to the construction of an assembly program.[2] The first published explanation of the coroutine appeared later, in 1963.[3]
KnuthVol1_1_4_5
was invoked but never defined (see the help page).Conway1963
was invoked but never defined (see the help page).