Web Api2 中线程的使用

System.Threading.Thread th = new System.Threading.Thread(方法名);
th.IsBackground = true;
th.Start();

上面是之前经常的写法,更新到服务器后发现该应用程序池经常频繁挂掉,把方法单独放到一个类中,然后使用new来每次实例化,就没不会挂掉了

原文地址:https://www.cnblogs.com/New-world/p/4466536.html