multi-threading-processing
Installation
SKILL.md
Multi-Threading and Multi-Processing Guide
This skill provides comprehensive guidance for implementing concurrent and parallel processing in Python applications. It covers when to use multi-threading vs multi-processing, best practices, performance considerations, and practical examples using the speedy_utils library's multi-worker implementations.
When to Use Multi-Threading vs Multi-Processing
Multi-Threading (Use for I/O-bound tasks)
Best for:
- Network requests (HTTP, database queries, API calls)
- File I/O operations (reading/writing files)
- GUI applications that need to remain responsive
- Tasks waiting for external resources
When to choose threading:
# I/O-bound example: Downloading multiple files
import requests
from speedy_utils import multi_thread