Your app is multi-threaded. You might be encountering a race condition on the shared variables (like bExit).

Is the Athlon the only dual-core machine your app is running on?

Try changing the "if-then-else" logic so that the first if tests only bExit, and the second "else if" is changed to a new "if".

Mike