Minor changes

This commit is contained in:
Mattia Giambirtone 2023-09-04 19:27:02 +02:00
parent b39d0ff809
commit 1c870da111
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ async def main_cancel(i):
print(f"[main] Child spawned, waiting {i} seconds before canceling it")
await structio.sleep(i)
print("[main] Cancelling child")
# Tasks can be cancelled individually, if necessary
# Tasks can be cancelled individually, if necessary.
# Cancellation is not a checkpoint, by the way (as
# evidenced by the lack of the 'await' keyword!)
task.cancel()
print(f"[main] Exited in {structio.clock() - t:.2f} seconds")