A
A
Anthony2283572020-08-04 18:03:08
Python
Anthony228357, 2020-08-04 18:03:08

Async and asyncio in python?

I'm trying to figure out at the moment asyncio and asynchrony in general in python. As I understand it, asyncio program speedups when you create several tasks and pass them to asyncio.gather (). Then these tasks, if they do not have blocking calls, run in parallel and faster. Are there any other ways, methods, tools in asyncio to make the program faster, besides asyncio.gather? And what is there for asynchrony in python besides asyncio which requires asynchronous frameworks? Please advise a suitable article, video, guide on the topic of asynchrony.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-08-04
@bacon

1. Asynchrony does not speed up the code, on the contrary, it adds a small overhead.
2. Asynchrony is one thread, therefore, one task works at one time
3. All "acceleration" is that IO Bound does not block the thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question