Steven D'Aprano <steve+pyt...@pearwood.info>:

> Say I want to download data from a network, and it will take a long
> time. If I can do the read in parallel to something else, that makes
> sense:
>
>   begin downloading in another thread/process
>   make a coffee
>   process download
>
> But what's the point in doing it asynchronously if I have to just wait for
> it to complete?

You can do many things concurrently, as the philosophers in my previous
example.

You will need two asyncs, one for downloading, another one for making
coffee, just like you would with threads. Then, run both asyncs
concurrently with asyncio.wait().


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to