Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
A cancellation token doesn't inherently do anything. It's up to the code which does the work to call ThrowIfCancellationRequested. If the token isn't passed on and isn't explicitly checked then the...
Answer
#1: Initial revision
A cancellation token doesn't inherently *do* anything. It's up to the code which does the work to call `ThrowIfCancellationRequested`. If the token isn't passed on and isn't explicitly checked then there's no point passing it in. If the real question is whether to call `ThrowIfCancellationRequested` in a trivial method: if it's truly trivial then don't.