|
|
|
|
|
by mazswojejzony
212 days ago
|
|
Maybe I'm nitpicking a bit but the second concrete example shows different flow in the parent method compared to the first one. If the second example would be a modification of the first one like shown below the output would be the same in both cases. async def parent():
print("parent before")
task = asyncio.create_task(child()) # <-- spawn a task
await task
print("parent after")
|
|