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

>
> But what's the point in doing it asynchronously if I have to just wait for
> it to complete?
>
>   begin downloading in an async thread
>   twiddle thumbs, doing nothing
>   process download

If you have nothing else to do, then there's no point.

But suppose you're implementing a web server. A request comes in - in
order to respond you need some data from a database. So you do the
database bit async. Whilst you're waiting for that you can get on with
processing other incoming requests.


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

Reply via email to