Is there a way to pass down a CancellationToken to commands? #1845
Unanswered
MihaMarkic
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think it shouldn't be that hard, shall I go ahead and create a PR time permits? |
Beta Was this translation helpful? Give feedback.
2 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.
-
I'm thinking about
IHostedService
where one gets aCancellationToken
upon start and then app can observe that token for cancellation requests. Ideally one could pass it like this:app.Run(args, ct);
. Workaround, not beautiful, is to store ct in a global variable.Or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions