Home Concurrency in Python
Post
Cancel

Concurrency in Python

threading vs asyncio vs multiprocessing

Concurrency TypeSwitching DecisionNumber of Processors
Pre-emptive multitasking (threading)The operating system decides when to switch tasks external to Python.1
Cooperative multitasking (asyncio)The tasks decide when to give up control.1
Multiprocessing (multiprocessing)The processes all run at the same time on different processors.Many

참고

This post is licensed under CC BY 4.0 by the author.

Trending Tags