Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当谈到 C# 中的线程时,我是个菜鸟,我不确定每个线程是否应该有自己的调用堆栈?基本上,如果我得到一个“运行时检查失败 #0 - ESP 的值不正确”,那只会崩溃它发生的线程,还是整个程序?
每个线程都有自己的堆栈,因此堆栈损坏只会直接影响单个线程。但是默认的线程异常处理程序将关闭应用程序。
每个线程都有自己的调用堆栈,因此损坏只会直接影响单个线程。
但正如 John 所指出的,这可能足以停止该程序。