Is it possible for Python to force the function to wait for the execution of multiple asynchronous requests?

There is a function in the application in Python, which makes the four get-request, and then assigns them to the answers in variables and then process these variables. This happens synchronously. Is it possible to run these four requests to be processed simultaneously, asynchronously, and then put the function on "pause" until then, yet they will not return the result? Ie actually write asynchronous code synchronously.


Application on the framework, Tornado
2 answers
October 3rd 19 at 03:07
October 3rd 19 at 03:09
Tornado is not used, but in twisted you can get it with inlineCallbacks decorator. It may pass as a tip.

Find more questions by tags Computer networksPythonProgrammingTornadoAsynchronous programming