Host.TryExecuteBackgroundServiceAsync logic #112798
Unanswered
WizardBrony
asked this question in
Q&A
Replies: 2 comments
-
Tagging subscribers to this area: @dotnet/area-extensions-hosting |
Beta Was this translation helpful? Give feedback.
0 replies
-
Looks to me like Task tries to prioritize OperationCanceledException but maybe it's not guaranteed. runtime/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs Lines 2774 to 2780 in c1fe87a @stephentoub in case he knows the promise, @eerhardt who added this. Maybe if the inner task itself threw an OCE but wasn't cancelled (stretching here)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is more of a question for my understanding than an actual issue:
runtime/src/libraries/Microsoft.Extensions.Hosting/src/Internal/Host.cs
Lines 184 to 195 in 58b068b
Is it actually possible for
backgroundTask.IsCanceled
to betrue
andex
to NOT be anOperationCanceledException
?Beta Was this translation helpful? Give feedback.
All reactions