我想在我的ASP淨MVC應用程序中實現這樣的邏輯:ASP.NET MVC多線程
user clicks a button
- >
server executes some time-consuming logic in ~15 threads (i get data from really slow independent sources)
- >
when all work is done, server merges the results and passes it back to user
有一天,我看到一篇文章解釋了爲什麼在asp-net應用程序中創建新的線程是高度不推薦的,並且ThreadPool是應該使用的。 這種情況下mvc的最佳做法是什麼?爲什麼我不應該創建自己的線程,背景工作者,任務,並使用線程池?如果有問題,該應用程序將託管在公共服務器上。
這將是一個由管理員/主持人執行的操作,所以它不是那種吝嗇的:) – 2010-09-25 17:53:18