c# - Does using Async programming paradigm improve performance all time -
this question has answer here:
i started read docs , blogs .net async programming model. in documents says use async if operation blocking work(access file system, access network, access sql etc. remote data storage (if have more examples blocking works please share them)).
what if system has enough power run works without using async model. need still need async?
i know don't waste thread calling blocking work, think have lots of free threads on threadpool.
please threat question asp.net application perspective
async (by async assume mean tap) code not parallelization, not same of using threads thread pool offload other work. async makes more efficient use of thread; rather blocking thread while wait disk or network work, free thread else while waits disk or network finish. if program pretty linear, , has no other work while it's waiting resources, no async code pretty pointless.
Comments
Post a Comment