Given that I've received questions regarding concurrency in python in a job interview for senior roles I'm now exploring different concurrency models in this repo: Threading, Multiprocessing, and Asyncio.
- threading/ β Examples using Python's built-in threading module.
- multiprocessing/ β Demonstrates parallel execution using multiple processes.
Clone the repository:
git clone https://github.com/yourusername/python-concurrency-examples.git
cd python-concurrency-examples
Install dependencies (if any):
pip install -r requirements.txt
Run a specific example:
python threading/basic_thread.py
- Difference between concurrency and parallelism.
- When to use threads, processes, or async.
- Performance trade-offs between different concurrency models.