You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
Currently, when waiting on a task and the task is canceled "InvalidOperationException" is thrown instead of "TaskCanceledException" as in .NET Framework. Since it is possible that the task itself throws "InvalidOperationException" during its execution the caller of the task cannot distinguish between the two cases based on the exception catch. Therefore, it would be better to throw "TaskCanceledException" to let the caller know that the task was canceled.
The text was updated successfully, but these errors were encountered:
Full cancellation support (with cancellation tokens and everything) is already in the roslyn branch, but if you make a decent pull request we can absolutely merge that into develop
Currently, when waiting on a task and the task is canceled "InvalidOperationException" is thrown instead of "TaskCanceledException" as in .NET Framework. Since it is possible that the task itself throws "InvalidOperationException" during its execution the caller of the task cannot distinguish between the two cases based on the exception catch. Therefore, it would be better to throw "TaskCanceledException" to let the caller know that the task was canceled.
The text was updated successfully, but these errors were encountered: