Before we get into detail, let's define these two terms:
- A coroutine is a computer science concept, a function that can be paused and resumed at certain intervals within it. Each time it is paused, it sends data out, and each time it is resumed, it receives data.
Python programs can define coroutines using the async and await keywords, and asyncio makes extensive use of them.
- A cooperative coroutine scheduler is a piece of code that picks up the execution each time a coroutine pauses and decides which coroutine to run next. It's called a scheduler because it keeps track of multiple streams of execution and decides which one gets to run at any given time.
It's called cooperative because ...