当一个人应该使用asp.net mvc的2异步控制器? [英] When should one use asynchronous controller in asp.net mvc 2?

查看:117
本文介绍了当一个人应该使用asp.net mvc的2异步控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止与 asp.net MVC1 工作,刚开始用 asp.net MVC2 .....什么是好的候选人异步执行的控制?我应该使用它的长期运行的进程或者一些后台处理?什么是选择在asp.net MVC 2异步控制器的优劣?任何建议...

Thus far worked with asp.net mvc1 and just started with asp.net mvc2..... what are good candidates for executing a controller asynchronously? Should i use it for long running process or some background processing? What are the pros and cons choosing asynchronous controller in asp.net mvc 2? Any suggestion...

推荐答案

仅使用异步如果操作IO约束。一个很好的例子是RSS聚合来自多个服务器的饲料,然后在网页上显示它们。

Only use async if the operation is IO bound. A good example would be aggregating RSS feeds from multiple servers and then displaying them in a webpage.

请参阅:

异步控制器的一个很好的概述。

for a good overview of asynchronous controllers.

和进行更深入的,但非MVC的具体信息:
<一href=\"http://blogs.msdn.com/tmarq/archive/2010/04/14/performing-asynchronous-work-or-tasks-in-asp-net-applications.aspx\">http://blogs.msdn.com/tmarq/archive/2010/04/14/performing-asynchronous-work-or-tasks-in-asp-net-applications.aspx

And for more in-depth but non-MVC specific info: http://blogs.msdn.com/tmarq/archive/2010/04/14/performing-asynchronous-work-or-tasks-in-asp-net-applications.aspx

这篇关于当一个人应该使用asp.net mvc的2异步控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆