开发者

What is the correct way to end a System.Threading.Tasks.Task?

As per the title really.

I have a long running task tha开发者_JS百科t 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?


The proper way of stooping tasks is using cancellation tokens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜