Grokking Concurrency in Python
0% completed
CPU Bound Work, Four Options
on_pool(f"index, {WORKERS} interpreters", InterpreterPoolExecutor, index, pages)
That line indexed Harvest's eight pages in 0.36 seconds. The line above it differs only in its label and its class, ProcessPoolExecutor, and took 0.31 seconds. The line below it uses ThreadPoolExecutor and took 2.20 seconds. Besides speed, each option also has its own startup time, its own build or version requirement, and its own limits.
The Four Options
Each option was introduced earlier in this course:
- Processes: a `ProcessPoolExecutor
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%