ThreadDeathEvent on stepping over unlock
public static void PseuCo_zaehler(){
int loop = 0;
for (loop = 0; loop < 5; loop++){
g.lock();
try {
n = n - 1;
} finally {
g.unlock();
}
}
}
- setup: T1, T2 suspend at breakpoint at int loop = 0;
- T1 steps over many times and suspends at g.unlock();
- T2 resumes but never hit breakpoint again
- T1 steps over g.unlock()
It's supposed to happen: T1 releases lock and T2 obtains lock
But T1 dies without even receiving a StepEvent.
I can't figure out what happens after StepRequest is enabled and before ThreadDeathEvent happens.
HELP......
Edited by Mei Chen