I'm trying to wrap my head around async/await in python.
Am I on the right track?
asyncand@coroutinefunctions returns coroutine/generator, not the returned value.awaitextracts the actual return value of coroutine/generator.
asyncfunction result (coroutines) is meant to be added to event-loop.awaitcreates "bridge" between event-loop and awaited coroutine (enabling the next point).@coroutine'syieldcommunicates directly with event-loop. (skipping direct caller which awaits the result)
awaitcan be used only inside async functions.yieldcan be used only inside@coroutine.
(@coroutine = @types.coroutine)