摘要
开发人员都愿意编写同步代码的原因是简单。但是,如果电脑不能快速响应用户界面的请求,鼠标就会不停地转圈,若在界面上点两下,界面变灰,标题栏上将出现"没有响应",然后使人束手无策。而异步编程则可使运行耗时的操作线程在后台运行,从而使开发人员在无需等待的同时,去执行其他的线程。为此,文中给出了基于.NET平台的异步编程实现方法。
Developers are willing to write synchronization code since it is simple. If the request of user interfase cannot be responded quickly by the computer, the mouse will stop turning in circles, and then if double-tap on the interface is executed, the interface is greyed, and the "not responding" appears on title bar. However, the asynchronous programming can make time-consuming operation thread to run in the background, and make the developers to perform other threads at the same time. A method .NET platformbased asynchronous programming is given in this paper.
出处
《物联网技术》
2013年第3期53-54,共2页
Internet of things technologies
关键词
同步
异步
线程
NET
synchronous code
asynchronous programming
operation threading