Parallelism means executing multiple tasks at the same time by using additional resources. It differs from concurrency: concurrency organizes tasks so they can be handled independently, even when they do not run simultaneously. section 2.1
A busier coffee shop
One waiter and one coffee machine serve customers in sequence. Add a second waiter and machine, and two customers can be served at once: that is parallelism. Instead, assigning one waiter to orders and another to coffee changes how work is organized; that is concurrency, whether or not the tasks run simultaneously. section 2.1.1
Neither term guarantees the other. Multiple requests can run in parallel without each request being divided into independently managed subtasks. Coroutines show the reverse: they can pause and resume tasks within one thread, providing concurrency without parallelism. section 2.1.2 section 2.2
Decide whether parallel execution is worth its cost:
- Consider it for CPU-bound work such as data processing or graphics rendering, or to improve throughput when handling requests and file operations. section 2.1.2
- Account for synchronization overhead and memory bottlenecks; lightweight tasks or tasks that coordinate frequently may not benefit. section 2.1.2
- Benchmark rather than assume linear scaling. In one theoretical i7-7700K example, spreading work across eight available threads yields an estimated 520% efficiency relative to one thread, not 800%. section 8.2.4






















































