+1  A: 

Though it looks like the thread is trying to use the Semaphore in thread 2 before thread 1 has finished running the constructor. In this case it is possible to have m_Sem be NULL(0) or any other value.

Martin York
A: 

Okay, I found the problem. My ActionQueue class was creating (in addition to others) two objects upon construction: a Semaphore, and a Thread. Problem was, this Thread was using that Semaphore. I incorrectly assumed that the Semaphore would be created automatically before entering the constructor since it is a member object. My solution was to derive ActionQueue from a base class in which my Semaphore is constructed; that way, by the time I get to ActionQueue's constructor, I can count on the base class's members already being constructed.

notfed