Answer the question
In order to leave comments, you need to log in
Is it possible in Python to make a function wait for multiple asynchronous requests to complete?
There is a function in a Python application that makes four get requests, then assigns their responses to variables, and then processes those variables. It happens synchronously. Is it possible to have these four requests processed at the same time asynchronously, and then put the function on "pause" until they all return a result? Those. actually write synchronously asynchronous code.
Application on the Tornado framework
Answer the question
In order to leave comments, you need to log in
No threading or multiprocessing. Need tornado.gen.WaitAll
www.tornadoweb.org/en/stable/gen.html
www.tornadoweb.org/en/stable/gen.html#tornado.gen.Wait
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question