Concurrency in Python
Threading, multiprocessing, and asyncio — from the GIL to structured concurrency, start to finish.
pythonconcurrencyasynciothreadingintermediate
Get Yaaddi on Google Play Free. Install the app, then add this course from its Course Library.
View this course's repo on GitHub → — star it, open an issue, or suggest a fix.
85decks
130main cards
670practice cards
0%with images
v1.1.7version
Card type mix
- multiple choice: 291
- true false: 137
- media card: 126
- select blank: 126
- multi select: 118
- type answer: 46
- order: 16
- match pairs: 15
- code fill: 7
- 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
- Bounded Queues & Backpressure
- Common Concurrency Bugs
- Profiling Concurrent Code
- Asyncio Debug Mode
- Signal Handling & Graceful Teardown
- Concurrency Selection Decision Tree
- Recap: Key Terms
Example cards
media card
What does 'concurrency' mean in programming?
media card
What's the difference between concurrency and parallelism?
Latest: Haiku review fixes: corrected factual errors and cards that did not match what their lesson teaches.