A task is a promise of work.
Granted you have a very simple task, that simply prints a Hello World
message to the console (as a silly, but well-known example), that gets queued up to the Thread Pool - is it possible that the Task
fails to complete, due to a user for example on the Operating System level aborting the thread pool thread in question?
I'm asking this because I have a queue of work items that have a continuation that will be ran regardless of the task's outcome, that disposes some IDisposable
items. It occurred to me that in the event of the above happening, the resources I used will be cleaned up at a later time by the finalizers of the IDisposable
objects.