Quiz

Juggling vs. Teamwork

Two words that sound alike but mean different things:

  • Concurrency means dealing with many things at once. One worker switches between tasks, making progress on each while the others wait. Think of one cook watching three pots.
  • Parallelism means doing many things at the same instant. That needs several workers, such as several CPU cores. Think of three cooks at three stoves.

asyncio gives you concurrency on a single thread. That's perfect when most of the time is spent waiting (I/O). It does not make number-crunching faster, because only one piece of Python runs at any moment.

Which situation is true **parallelism**?