Hi Jason,
Yes you are correct, I see in the documentation :). I hadn't considered the task would be transitioning to completed instead of cancelled in that case.
I agree about the DoWork() overlapping I was just pointing it out.
I do think you code would be significantly reduced in complexity if you just used the timer. It does mean if you try to cancel the timer there is a possibility that DoWork() has started and you will have to wait for it complete before you can destroy your class.
Steve
Yes you are correct, I see in the documentation :). I hadn't considered the task would be transitioning to completed instead of cancelled in that case.
I agree about the DoWork() overlapping I was just pointing it out.
I do think you code would be significantly reduced in complexity if you just used the timer. It does mean if you try to cancel the timer there is a possibility that DoWork() has started and you will have to wait for it complete before you can destroy your class.
Steve