Python Multithreading and Multiprocessing: Concurrency and Parallelism
summary
Covers concrete Python APIs and tradeoffs by showing threading and multiprocessing modules with runnable examples and demos of global interpreter lock behavior that releases on I O but blocks CPU bound code, how a process pool bypasses the GIL for true parallelism, and how a thread pool limits concurrency. Shows Lock, RLock, Semaphore, Event, Condition, Timer, pipes, queues, Manager proxies, shared memory and pickling, explains zombie processes and recommends preferring shared memory and careful termination for performance and correctness.
AI-written summary · about
chapters (15)
- 0:00Start
- 4:11Concurrency
- 7:24Python threading
- 11:20Thread parallelism
- 12:17Global Interpreted Lock
- 15:07Thread pool
- 16:06Python multiprocessing
- 17:33Deadlock
- 18:34Locks & RLock
- 19:47threading.semaphore
- 23:17Pipes
- 25:19Queue
- 25:35Shared memory
- 26:54Server process
- 28:03Don't do it
related talks
35mWriting robust, readable, and maintainable concurrent programs in Python
36mConcurrency and Parallelism with Python for Humans
10mRedlining Your CPU for Fun and Profit: Threading and Multiprocessing in Python
02h 57mPython Concurrency: from beginner to pro
32mPython's Parallel Programming Possibilities - 4 levels of concurrency
30mParallel computing in Python: Current state and recent advances
31mGetting Around the GIL: Parallelizing Python for Better Performance
39mUnlocking the Parallel Universe: Subinterpreters and Free-Threading in...
