B
Bruno van Dooren
Hi,
i was debugging a multithreaded app, when i stumbled across some weird
behavior of the debugger.
in the destructor of my main object i send a stop event to the worker
thread, and then wait until that thread has finished.
m_Stop = true;
while(GetExitCodeThread() == STILL_RUNNING)
Sleep(50);
the strange thing is that if i break just before the m_Stop = true, and then
step through the while loop, the exit code is STILL_RUNNING forever. i can
step forever without the thread ever ending.
if a break just after the while loop, the thread has stopped without a
problem.
is this normal behavior?
kind regards,
Bruno.
i was debugging a multithreaded app, when i stumbled across some weird
behavior of the debugger.
in the destructor of my main object i send a stop event to the worker
thread, and then wait until that thread has finished.
m_Stop = true;
while(GetExitCodeThread() == STILL_RUNNING)
Sleep(50);
the strange thing is that if i break just before the m_Stop = true, and then
step through the while loop, the exit code is STILL_RUNNING forever. i can
step forever without the thread ever ending.
if a break just after the while loop, the thread has stopped without a
problem.
is this normal behavior?
kind regards,
Bruno.