Answer the question
In order to leave comments, you need to log in
What problems can arise with aiohttp?
All the same, aiohttp is an asynchronous framework, but it was not possible to catch typical incidents of asynchrony.
So I don't really understand how it works?
Let's say I want to calculate the variable b, which is simply equal to the variable a on the backend, which in turn is taken from the base.
The way it will happen is as follows: there is a corrutina in which b=a is assigned by launching another subroutine that executes a query to the database - climbs there for the variable a.
These tasks are separated and fall into the event loop as different. And the subroutine which climbs in base is defined at first. Obviously, it will take longer than a simple assignment to b=a, so the event loop will jump right into the assignment. Means processing is not similar to synchronous. How it works? Everywhere they write that aiohttp allows you to run asynchronous workers and at the same time write code as if it were synchronous.
Can I fully rely on this statement?
Should there be any stipulations? To improve performance, is it better to write corrutins small and split tasks into a bunch of subroutines? Or, on the contrary, is it better to shove everything into one corrutinum?
I'm sorry, I'm just a little confused
Answer the question
In order to leave comments, you need to log in
Everywhere they write that aiohttp allows you to run asynchronous workers and at the same time write code as if it were synchronous.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question