News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by heavenlyblue on Wednesday July 05, 2023 @01:04PM (#36603387)
> In Python, cancellation causes an exception to be injected at the await site, which allows it to clean up whatever resources it likes (even if that means making other async calls). If you use Trio or the new TaskGroup in asyncio (inspired by Trio) then an exception leaking out of one task causes the others to be cancelled, and then the task group waits for all tasks to complete (successfully, with exception, or cancelled). It's extremely nice and easy to write reliable programs.

But not in JavaScript.

There are no comments on this comment yet.