Is python a thread or multiprocessor in the kernel of asynchronous calls?

I already worked with python asynchronous frames like Twisted and Tornado. I also know that python already has a built-in implementation of asynchronous calls through the asyncio module. I thought that (threads, multiprocessing) and asynchronous calls are different concepts. But recently, I watched several videos related to streaming processing and multiprocessing, and it seems that all these asynchronous characters are built on top of them. It's true?

+4
source share
2 answers

No, asynchronous calls are a way to structure a program. threading, multiprocessingcan be used to implement some of these calls (but they are neither necessary nor common in Python asynchronous frames).

Concurrency is not parallelism :

In concurrency programming, there is composition independently the execution of processes, and parallelism is the simultaneous execution of (possibly related) calculations

, ( ). , , . Pool , multiprocessing.Pool (), multiprocessing.dummy.Pool () gevent - (). , , , .

async async Python, - . asyncio - , , curio, async, asyncio. : Python concurrency : LIVE!.

+6

, , async , async ( async). , .

[ ] , . , , , . , , - , 2, 3, . .

: http://krondo.com/?p=1209

+4

Source: https://habr.com/ru/post/1623219/


All Articles