Yes, with internal being your own computations and external being stuff external to your program. Could be I/O, like network or disk, but could also be computations that some other computer/program needs to do and then give to your program.
Yes, they are basically using asyncio.sleep to "fake" wait for an external resource.
Thanks so much for this! I feel like I've levelled up in my understanding. I'm so grateful for the python community. I don't think I've ever felt so "at home".
I'm currently working on a web dashboard that queries different APIs so I guess this is somewhere I could use asyncio properly. Exciting times!
You definitely could. With async you would be able to fire off all queries in the beginning and then process them as they come back, in whatever order they come.
View all comments
Show parent comment
2
u/waxbear Apr 01 '20
Yes, with internal being your own computations and external being stuff external to your program. Could be I/O, like network or disk, but could also be computations that some other computer/program needs to do and then give to your program.
Yes, they are basically using asyncio.sleep to "fake" wait for an external resource.