[C#] Three Essential Tips for Async (三个不可或缺的异步观念)

Async C# tips


Tip 1
Async void is only for top-level event handlers.
Tip 2
User threadpool for CPU-bound code - but not for IO-bound code
Tip 3
Async tasks can wrap around events with TaskCompletionSource, to make code simpler.
Reference:

https://channel9.msdn.com/Series/Three-Essential-Tips-for-Async/Three-Essential-Tips-For-Async-Introduction
https://www.syncfusion.com/resources/techportal/details/ebooks/Asynchronous_Programming_Succinctly

原文:大专栏  [C#] Three Essential Tips for Async (三个不可或缺的异步观念)


猜你喜欢

转载自www.cnblogs.com/chinatrump/p/11516420.html
今日推荐