[C #] Three Essential Tips for Async (asynchronous three essential concepts)

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

Original: Large column  [C #] Three Essential Tips for Async ( asynchronous three essential concepts)


Guess you like

Origin www.cnblogs.com/chinatrump/p/11516420.html