Answer the question
In order to leave comments, you need to log in
How to implement the execution of processes asynchronously?
Hello, there is such a scheme
Where the first element is a queue with a capacity of 6 elements, and then 2 handlers, the point is that with some random delay (1-2 seconds) we launch an element into the queue and if one of the handlers is empty, then we release the element from the queue to the handler, where it lingers for 5 seconds and exits, but while the elements in the handlers are being processed, the queue fills up and as the elements exit the handler, new and so certain amount of time enters it. I want to implement this with a libraryasyncio
(Tell me if this is the best option or not), but I can’t figure out how to do this, because first you need to generate the entire list of tasks, and only then launch it asynchronously, but in this case it won’t be possible to generate it in advance. Please write your thoughts and push on the right path (preferably with some examples), because I'm a little confused, thank you all in advance
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question