A generalization of subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed.
"Coroutines are used in programming to simplify asynchronous programming by making asynchronous operations look more like sequential ones."
— @openai ·