Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Do you see any warnings while compiling this code? I would expect some warnings about the order in which you are initializing your class members.

In C++ member variables are initialized according the order of declaration, not the order you choose in the constructor. As you have declared the Sychronizer first, it's constructor will be called with uninitialized subscribers. That can cause all kind of nasticities, including the one you observed.

cheers Dariush