以下这段代码会让应用程序崩溃
private void Foo()
{
Thread thread = new Thread(() => { throw new Exception("An unhandled exception occurred in the thread."); });
thread.Start();
}
问题来了,同样是在.net core 3.1下,为什么下面这段代码不会让应用程序崩溃
private void Foo()
{
Task.Run(() => throw new Exception("An unhandled exception occurred in the task."));
}