Asyncio -- delayed calculation

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Nov 30 07:35:41 EST 2016


> On Tuesday 29 November 2016 14:21, Chris Angelico wrote:
> 
>>"await" means "don't continue this function until that's done". It
>>blocks the function until a non-blocking operation is done.

That explanation gives the impression that it's some
kind of "join" operation on parallel tasks, i.e. if
you do

    x = foo()
    do_something_else()
    y = await x

then foo() somehow proceeds in the background while
do_something_else() is going on. But that's not the
way it works at all.

-- 
Greg



More information about the Python-list mailing list