Pong - 2008-06-03

Dear all,

I use Loki 0.1.6 with VC++ 2008 Express. My program requires multithreading; therefore, I compile with the macro LOKI_OBJECT_LEVEL_THREADING. The problem occurred in ClassLevelLockable which is also included during compilation. I use SingletonHolder with Factory module. From Modern C++ Design book, the author suggest to use anonymous namspace to initialize the Factory with global variables. However, since ClassLevelLockable has a static membership variable (static Initializer initializer_;), which is initialized as a global variable and must be initialized before any use of locking, my program produces assertation error at line 355 in threads.h. This error means that my Factory Singleton activates before the initializer_. As in my knowledge, I cannot specify initialization sequence of global variables. Hence, how could I resolve this assertation problem?