Using .NET 4.0 Task in ASP.NET

元气小坏坏 提交于 2019-12-10 21:04:45

问题


Are there any caveats or short comings to using the new Task API in System.Threading.Task in ASP.NET hosted under IIS?

I know prior to .NET 4.0 working with any of the ThreadPool actions inside of IIS was always recommended to be avoided.


回答1:


Any caveats to using ThreadPool with IIS would still be valid using System.Threading.Task, as the Task API is just an additional layer of abstraction over System.Threading.

For long-running tasks in the background, I use a ThreadPool inside a Windows Service. This keeps it outside of IIS.



来源:https://stackoverflow.com/questions/2924819/using-net-4-0-task-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!