Concurrency in Python
Threading, multiprocessing, and asyncio — from the GIL to structured concurrency, start to finish.
pythonconcurrencyasynciothreadingintermediate
85decks
127main cards
660practice cards
20%with images
v1.0.0version
Card type mix
- multiple choice: 206
- true false: 131
- media card: 127
- select blank: 127
- multi select: 119
- type answer: 46
- order: 16
- code fill: 7
- match pairs: 4
- command output: 3
- image choice: 1
What's covered
- Concurrency Models Comparison
- Workload Types (I/O-Bound vs. CPU-Bound)
- Global Interpreter Lock (GIL) Mechanics
- GIL Impact on Workloads
- Circumventing & Modern Evolution of the GIL
- Creating & Managing Threads
- Thread Execution Synchronization (join)
- Main vs. Worker vs. Daemon Threads
- Thread Metadata & Identity
- Thread Communication & Return Values
- Race Conditions & Critical Sections
- Mutual Exclusion (threading.Lock)
- Reentrant Locking (threading.RLock)
- Deadlocks & Lock Ordering
- Atomic Operations & Built-in Thread Safety
- Event Signaling (threading.Event)
- Conditional Synchronization (threading.Condition)
- Resource Throttling (threading.Semaphore)
- Delayed Execution (threading.Timer)
- Thread-Local Storage (threading.local)
- Process Creation & Execution
- Memory Isolation: Threads vs. Processes
- Process Start Methods (fork, spawn, forkserver)
- Platform-Specific Process Behaviors
- Process Exit Codes & Error Handling
- Inter-Process Queues (multiprocessing.Queue)
- Inter-Process Pipes (multiprocessing.Pipe)
- Basic Shared Memory (Value & Array)
- Modern Shared Memory (multiprocessing.shared_memory)
- Process Managers (multiprocessing.Manager)
- Inter-Process Locking (multiprocessing.Lock)
- Reentrant Inter-Process Locking (multiprocessing.RLock)
- Inter-Process Events & Semaphores
- Process Synchronization Barriers (multiprocessing.Barrier)
- Worker Process Teardown Patterns
- Executor Pool Selection
- Task Submission Mechanics (submit vs. map)
- Pool Context Management & Lifecycle
- Pool Sizing & Resource Management
- Queue Backpressure in Executors
- Future Objects Core Lifecycle
- Non-Blocking Future Checks & Timeouts
- Future Completion Callbacks
- Handling Collections of Futures
- Task Cancellation Mechanics
- Async Syntax & Coroutines
- The Event Loop Paradigm
- Yielding Control in Coroutines
- Event Loop Starvation & Blocking
- Coroutines vs. Synchronous Functions
- Task Instantiation (asyncio.create_task)
- Coroutines vs. Tasks vs. Futures in Asyncio
- Concurrent Task Gathering (asyncio.gather)
- Out-of-Order Async Results (asyncio.as_completed)
- Async Task Cancellation Mechanics
- Async Timeouts & Deadlines
- Structured Concurrency (asyncio.TaskGroup)
- Exception Groups in Async Contexts
- Multi-Task Waiting Strategies
- Shielding Async Tasks from Cancellation
- Async Mutual Exclusion (asyncio.Lock)
- Async Throttling (asyncio.Semaphore)
- Async Signaling (Event & Condition)
- Async Queues (asyncio.Queue)
- Sync Lock Errors in Async Code
- High-Level Async Network Streams
- Async Stream Readers & Writers
- Transports & Protocols (Low-Level Async)
- Async Subprocesses
- Asynchronous HTTP Clients
- Offloading CPU Tasks from Async (run_in_executor)
- Modern Thread Offloading (asyncio.to_thread)
- Dedicated Event Loop Threads
- Sync-to-Async Bridge
- Thread-Safe Async Scheduling
- Producer-Consumer Pattern Architecture
- Queue Implementation Selection
- Queue Completion & Joining
- Graceful Shutdown & Poison Pills
- Bounded Queues & Backpressure
- Common Concurrency Bugs
- Profiling Concurrent Code
- Asyncio Debug Mode
- Signal Handling & Graceful Teardown
- Concurrency Selection Decision Tree
Example cards
media card
What does 'concurrency' mean in programming?
media card
What's the difference between concurrency and parallelism?
Latest: Initial release — 85 decks, 914 cards, each pack with a preview card teaching the concept before its graded main card and practice cards.