Asynchronous operations performance

后端 未结 3 1121
夕颜
夕颜 2021-01-07 12:28

One of the features of asynchronous programming in .NET is saving threads during long running operation execution. The FileStream class can be setup to allow as

3条回答
  •  Happy的楠姐
    2021-01-07 13:28

    Are you sure that you benchmarked your copy operation correctly? Any asynchronous operation just create new thread and runs the operation in new thread while leaving main thread to do other things.

    The asynchronous operations mostly give a a few simplifications(less lines of code) over creating the thread yourself but they should not impact performance more then creating a new Thread.

提交回复
热议问题