views:

79

answers:

2

I'm a noob when it comes to threading in C#, and I'm not sure if each thread is supposed to have its own call stack? Basically, if I get a "Run-Time Check Failure #0 - The value of ESP was not properly " , would that crash only the thread in which it occured, or the entire program?

A: 

Each thread has its own call stack, so corruption will only directly affect a single thread.

But as pointed out by John, this may be sufficient to halt the program.

Mitch Wheat
+8  A: 

Each thread has its own stack, so stack corruption will only directly affect a single thread. But the default thread exception handler will take down the application.

John Knoeller
Phew, that's a relief:) For a moment I thought I won't be able to handle a crashing thread:)
Emil D