Answer the question
In order to leave comments, you need to log in
How to properly cancel a Task?
I study the cancellation of tasks through CancellationToken
the button, I hung a handler that cancels the task, and in the task itself I check whether it is canceled with the help token.ThrowIfCancellationRequested();
of. Having reached the throw of an exception, the WF application crashes.
How to properly handle this exception?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question