Reputation: 34800
As per the title really.
I have a long running task that polls a message queue.
Occasionally I may wish to stop the task, do some work and then start it again. What is the correct way of doing this?
Upvotes: 5
Views: 3002
Reputation: 1038720
The proper way of stooping tasks is using cancellation tokens.
Upvotes: 5