Skip to main content
The concurrent.futures module provides a high-level interface for asynchronously executing callables using threads or processes.

Module Import

ThreadPoolExecutor

ProcessPoolExecutor

Handling Results

Wait for Completion

Use ThreadPoolExecutor for I/O-bound tasks and ProcessPoolExecutor for CPU-bound tasks.

threading

Thread-based parallelism

multiprocessing

Process-based parallelism

asyncio

Asynchronous I/O