Python Concurrency: from beginner to pro
summary
Covers concrete claims, tools and timings: explains OS/process/thread internals, uses _thread, threading, subprocess, multiprocessing and concurrent.futures, and demonstrates a Flask crypto web server repo (https://github.com/santiagobasulto/pycon-concurrency-tutorial-2020) that is run with artificial sleep to compare approaches. Shows sequential HTTP checks ~6.8s, threads ~2.3s for IO work, prime tests where threads hurt (≈4.2s) and processes win (≈0.76s), and emphasizes GIL blocks CPU‑bound parallelism and the producer–consumer queue/pool patterns that avoid manual locking.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:03What this tutorial is NOT about
- 4:33Martelli Model of Scalability
- 11:31The OS is the one protecting hardware
- 17:36The OS Scheduler
- 23:54We can run several instances of the same program (at the same time)
- 25:50A multithreaded example
related talks
35mWriting robust, readable, and maintainable concurrent programs in Python
31mPython Multithreading and Multiprocessing: Concurrency and Parallelism
10mRedlining Your CPU for Fun and Profit: Threading and Multiprocessing in Python
36mConcurrency and Parallelism with Python for Humans
30mSpeed Up Your Data Processing
01h 29mStandardised Coroutine Concurrency in Python 3
28mWhy Should Async Get All The Love Advanced Control Flow With Threads
27m"Python’s tale of concurrency"
