How Coroutines Enable Cooperative Multitasking and Concurrency
Too Long; Didn't Read
Coroutines are a mechanism that runs a set of instructions in a cooperative way. This means that the operating system doesn't control the scheduling of tasks or processes performed by coroutines. This is useful for operations where we need to wait for certain operations to complete like a query to a database or a **REST** request to the website.