• concurrent execution

A coroutine is a program component that allows execution to be suspended and resumed, generalizing subroutines for cooperative multitasking
Well-suited for implementing program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists, and pipes

Coroutine vs Thread

Coroutines are similar to threads, but they are not the same thing. Threads are managed by the operating system and can run in parallel on multiple processors, while coroutines are managed by the program and run on a single thread