Zachary Ware <[email protected]> added the comment:
You missed something :)
By immediately awaiting the result of `create_task`, you're synchronizing
thing. It's the same as just rearranging the lines of the first example to:
t0 = create_task(task("T0", 10))
print("starting tasks ...")
await t0
t1 = create_task(task("T1", 10))
await t1
Basically, `t1` simply doesn't exist yet when you ask `t0` to run to completion.
----------
nosy: +zach.ware
resolution: -> not a bug
status: open -> pending
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43736>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com