Search across all documentation pages
11 pages in this section.
Why Python has so many concurrency tools instead of one - threads, processes, subinterpreters, and free-threaded builds are different points on a single spectrum of how much memory gets shared and what enforces safety over it - the mental model behind every other page in this section.
Explore 9 Python concurrency examples, from basic to intermediate. Understand concurrency vs. parallelism and when to use threads or processes.
Learn to use Python's threading module for concurrent I/O-bound tasks. Implement threads, locks, events, and queues with practical examples.
Learn how Python's multiprocessing module parallelizes CPU-bound work, shares data via queues and pipes, and bypasses the GIL.
Learn to use concurrent.futures for managing concurrency in Python. Explore ThreadPoolExecutor for I/O and ProcessPoolExecutor for CPU-bound tasks.
Implement producer/consumer patterns in Python using queue.Queue for threads or multiprocessing.Queue for processes. Learn to smooth bursts and manage backpressure.
Choose a Python concurrency model (asyncio, threads, processes) based on workload, APIs, and operability. This checklist guides your decision from profiling data.
Learn concurrency best practices for Python, covering thread, process, and async code. Avoid races, deadlocks, and shared mutable state with these rules.
A single-page roundup of every highlight bullet from the 10 pages in the Concurrency section, grouped by source page so you can scan all 58 takeaways without opening each article individually.