Does "coroutines" stand for "concurrent routines" ...
# coroutines
c
Does "coroutines" stand for "concurrent routines" or "cooperative routines"?
t
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] You can dig deeper if you would like. 🙂 Of course it is possible that Kotlin folks have their own interpretation.
👍 1
s
Most sources will give cooperative as the origin. A coroutine wasn't originally a unit of concurrency or multitasking. Instead it's a variation on the concept of a subroutine. Subroutines (i.e. functions) return to their caller; coroutines can transfer control to another arbitrary routine instead. A program using that original form of coroutines would still be a single sequential control flow, and wouldn't execute concurrently. The modern use of coroutine, to refer to concurrent virtual threads, came later, influenced by things like goroutines.
👍 1
💯 1
🔥 2