Comment by jayd16

1 year ago

It's not so much that exceptions are bad though. Cancellation tokens throwing is not obsolete. Mutex and such can be cleaned up in finally blocks in .NET. It's just that being able to place the exception in a predictable place has benefits.

Python/C++ has finally: blocks as well.

They're not nearly as good as the `with` statement (or context handler) in python.

  • I mentioned .NET in response to the parent and the context of the CancellationToken class. What is the relevance of your comment?

    • What's the point of continuing discussion if all you understand is .NET?