Nov-01-2022, 08:35 PM
(Oct-31-2022, 03:47 PM)wavic Wrote: You can print a message for every request and after that youawait asyncio.sleep(15)
both in maincoro. Run the whole thing and refresh the "web page" two-three times. If you get the message on every refresh it is asynchronous.
Consider looking at ASGI. You will end up building one or similar anyway. Just to build on top of your framework. Unless you want to do something completely different.
Do not use time.sleep. It is blocking. Async.sleep is not
I believe that, to find out if the function really works asynchronously, it captures the id of the secondary thread, but how do I do that, as it seems to be dynamic?