What is recommended way to perform async tasks in WPF?

后端 未结 4 1398
心在旅途
心在旅途 2021-01-18 12:52

Are there any standard tools, or recommended approaches for async tasks execution?

UPD I understand, how to use threads. I only need to know the recommended WPF way

4条回答
  •  不要未来只要你来
    2021-01-18 13:49

    In addition to standard threads. One thing to use are Async methods of many classes, that can do it. This includes web service requests, file read/write operations.

    One thing to look at is Coroutines, used mainly by Caliburn.Micro . But its not standard way to do it.

    Also .NET 4 adds Task class along with ParallelExtensions, that is capable to do some async programming easier. But its still clumsy, so .NET 5 adds async programing model, to make thigs even easier. But god knows when its going to be released.

提交回复
热议问题