Just a dumb question. But what are the benefits? Am I understanding this right that when I write to this file a few GB data the program continues it's run and will not hang until the data is written? And what if I need to write into the file from another function but the file is still written to?
@@Carberra What? Doesn't the await keyword make it wait anyway, so the program *doesn't* continue execution? Or did I misunderstand async. Isn't this only beneficial if we read/write many files at once, and then await them all at the same time?
You've misunderstood, though the terminology is a bit odd with the whole "await" thing. I did a video a little while that better explains async (ruclips.net/video/vLbZUVKFVxY/видео.html). Aiofiles specifically is probably most beneficial in something like a bot, or some other service that's running 24/7.
I love the auto-generated captions!
"aero-files"
"AOL-files"
Btw what is the best way to use postgres asynchronously?
Asyncpg is your best bet I believe.
Just a dumb question. But what are the benefits? Am I understanding this right that when I write to this file a few GB data the program continues it's run and will not hang until the data is written? And what if I need to write into the file from another function but the file is still written to?
1) Pretty much right. It's basically so you don't block async applications. 2) You'd need to handle that yourself.
@@Carberra What? Doesn't the await keyword make it wait anyway, so the program *doesn't* continue execution? Or did I misunderstand async. Isn't this only beneficial if we read/write many files at once, and then await them all at the same time?
You've misunderstood, though the terminology is a bit odd with the whole "await" thing. I did a video a little while that better explains async (ruclips.net/video/vLbZUVKFVxY/видео.html). Aiofiles specifically is probably most beneficial in something like a bot, or some other service that's running 24/7.