liveBook · Manning

Parallelism

As explained in Refactoring to Rust

Parallelism is the execution of multiple computations simultaneously to perform work concurrently.

Parallelism executes multiple computations simultaneously. A single thread runs on one processor core at a time; parallel systems run multiple threads at once when hardware provides available cores. Concurrency is broader: multiple executions may progress within one application without running simultaneously. section 8.4

The practical goal is to divide work into tasks that can use additional processors. Four threads on four cores can run in parallel, while applications with more threads than processors may run concurrently instead. Parallel execution can improve throughput, but task ordering is not guaranteed. section 8.4

Parallel Mandelbrot work

A Python application creates a ThreadPoolExecutor with four workers, submits Mandelbrot computations, and awaits eight tasks with asyncio.gather. The example distributes independent image calculations across execution threads rather than processing them serially.

How Refactoring to Rust covers it

How deep it goes
Defines parallelism against concurrency, illustrates throughput and ordering, and stops short of detailed synchronization mechanics.
Examples
Uses four threads on four cores, a two-hammer can crusher, and Python Mandelbrot tasks submitted through ThreadPoolExecutor.
What it assumes
Teaches the distinction from processor and thread basics, while assuming no prior parallelism terminology.
What you can do after
Apply parallelism via ThreadPoolExecutor and asyncio.gather to distribute independent computations across execution threads.
How it connects
Connects parallelism with concurrency, thread safety, memory safety, processors, and foreign-function interfaces.

Also explained in

Compare how 38 books explain parallelism →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Refactoring to Rust. The section links point to the parts of the book it draws on.