Skip to main content
Loading page…
Python Mastery
Chapter 37
Lesson 3 of 4
Threads, Processes & Executors
Contents
Notes
Tutor
Note
Recall: the GIL and When Threads Help
Loading activity…
Previous
1 / 10
Continue
Contents
Notes
Discussion
Tutor
26 min
10 activities
0 of 10 done
In this lesson
1
Recall: the GIL and When Threads Help
2
The Python Concurrency Landscape
3
ThreadPoolExecutor: Parallel I/O
4
ProcessPoolExecutor: CPU-Bound Parallel Work
5
run_in_executor: Bridging Sync Code into Async
6
submit() and Future Callbacks
7
Match the Workload to the Tool
8
Bridge a Blocking Function into Async
9
ProcessPoolExecutor and the if __name__ Guard
10
GIL and Thread Parallelism
Objectives
Learner can use ThreadPoolExecutor and ProcessPoolExecutor from concurrent.futures
Learner can bridge blocking sync code into an async program with loop.run_in_executor
Learner can explain the GIL and why it affects CPU-bound vs I/O-bound parallelism
Learner can choose the right concurrency tool (async, threads, processes) for a given workload
Learner can submit work with submit() and map() and handle futures
Chapter 37 · Asyncio Deep Dive & Concurrency Patterns
The Event Loop, Tasks & Gathering
Async Synchronization & Queues
Threads, Processes & Executors
Real Async I/O
Previous: Async Synchronization & Queues
Next: Real Async I/O