I can't believe I don't know this already, but I'm unable to figure out how to know if a thread is finished
and wait for it if it isn't w/out a race condition. I've used the AfxBeginThread() to start it, and I'm told that I would WaitForSingleObject() to know when it is done, but it seems that that function returns WAIT_FAILED if the thread is no longer running. What's the appropriate way to just know if it's done and wait if it hasn't
without a race condition?