Asynchronous Programming with async and await (C#)用async和await实现异步编程

来源:互联网 发布:淘宝商品名称字数限制 编辑:程序博客网 时间:2024/05/17 03:46

You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous applications can be complicated, making them difficult to write, debug, and maintain.

你可以用个使用异步编程来避免表现瓶颈跟提供整体的能力,然而传统的技术来写异步应用非常负责,很难写,调试,维护。

Visual Studio 2012 introduced a simplified approach, async programming, that leverages asynchronous support in the .NET Framework 4.5 and higher as well as in the Windows Runtime. The compiler does the difficult work that the developer used to do, and your application retains a logical structure that resembles synchronous code. As a result, you get all the advantages of asynchronous programming with a fraction of the effort.

vs2012 提供了一个简单的异步编程方法,利用.NEt4.5以及以上的版本支持的异步,编译器完成了开发者的复杂工作,你的应用保持同步的架构即可,然后你将花费少的经历来获得异步的优势

This topic provides an overview of when and how to use async programming and includes links to support topics that contain details and examples.

这个文章提供了一个整体的介绍关于什么时候以及怎么使用异步编程。

0 0