walterlv / BlogComments

3 stars 0 forks source link

post/a-single-task-listen-to-multiple-cancellation-requests #132

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

.NET 单个异步任务如何同时监听多个取消请求(CancellationToken) - walterlv

异步编程中,并不是所有时候 await 等的都是新的异步任务;有时候同一个异步任务可能被多次等待,并且每个等待都可以有自己的取消请求,即 CancellationToken。那么如何在一个异步任务中同时响应多个取消请求呢?

https://blog.walterlv.com/post/a-single-task-listen-to-multiple-cancellation-requests.html

terry117 commented 1 year ago

学习了