在ASP.NET MVC用火和忘记的危险 [英] Danger of Using Fire and Forget in ASP.NET MVC

查看:152
本文介绍了在ASP.NET MVC用火和忘记的危险的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的发射后不管在ASP.NET MVC应用程序意味着,我产卵长时间运行的CPU和IO密集型后台线程它不依赖于用户的需求。这个伟大的工程,但我担心的应用程序域/进程回收的时间过程中,我的后台线程保证运行至完成,也可能在中间停下来。如果有任何危险,那么如何避免这种情况。

I am using Fire and Forget in ASP.NET MVC application means that I am spawning a long running CPU or IO intensive background thread which does not depend upon user need. This works great but I am fearing that during the process of application domain/process recycling time my background thread is guarantee to run to completion or it might stop at the middle. If there is any danger then how to avoid this situation.

推荐答案

下面是正确答案(Windows服务或 WebBackground

Here is the correct answer(Windows Service or WebBackground),

这篇关于在ASP.NET MVC用火和忘记的危险的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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