Real CPU parallelism, isolated memory, IPC, pools, and 10 production patterns β with interactive diagrams
What a process actually is, why it's the only way past the GIL for real CPU parallelism, and how isolated memory changes everything β read this first.
Create, start, and join a Process β and the __main__ guard you can't skip.
The modern way. submit, map, Futures β and the one-line swap from threads.
No shared memory means you pass messages. Queue and Pipe for IPC.
When copying is too slow: Value, Array, shared_memory, and Manager.
The classic worker pool: map, imap, starmap, and why chunksize matters.
Cross-process Lock, Event, Semaphore, and Barrier β and why they're heavier than threads'.
fork vs spawn vs forkserver β the source of half of all multiprocessing bugs.
Everything crossing a process boundary is pickled. What can't cross, and how to make it cheap.
How a child crash surfaces, terminate vs graceful stop, and signals across processes.
The reason you're here: real speedups on CPU work, chunking, and Amdahl's hard limit.
Why one GIL per process is the whole point, and what free-threaded Python 3.13+ changes.
The decision guide from the process side: when the serialization tax is worth paying.
multiprocessing vs concurrent.futures vs joblib vs subprocess vs Dask/Ray β what each is for.