The statements after yield from will be executed immediately.
This asynchronous means: when coroutine A performs a blocking operation, it temporarily switches to the execution of other coroutines. When the blocking operation of coroutine A is completed, execution will continue from where coroutine A last paused.
According to the meaning in the picture, sleep is considered a blocking operation, so it will be switched to other coroutines for execution. After 1s, the event loop gets the message that the blocking operation of sleep has been completed, so it continues to execute the operations after sleep in hello().
The statements after yield from will be executed immediately.
This asynchronous means: when coroutine A performs a blocking operation, it temporarily switches to the execution of other coroutines. When the blocking operation of coroutine A is completed, execution will continue from where coroutine A last paused.
According to the meaning in the picture, sleep is considered a blocking operation, so it will be switched to other coroutines for execution. After 1s, the event loop gets the message that the blocking operation of sleep has been completed, so it continues to execute the operations after sleep in hello().