我有这个方法的web api应用程序
public class TestController
{
public UserView Get()
{
var testThread = new Thread(() => { throw new Exception(); });
testThread.Start();
Thread.Join();
Thread.Sleep(1000);
return null;
}
}
var task = new Task(() => { throw new Exception(); });
task.Start();
一切都很好。为什么呢?