The problem now is that get init using a dummy namespace, then it later initializaes itself! Quite frustrating.

header:
Code:
	namespace
	{
		long nJobInitDummy = SJobInit::init();
	};
Code:
	SBaseQueue<SWJob>* baseQueue = 0;
	SThreadPool* threadPool = 0;
	long SJobInit::initStatus = 0;

	long SJobInit::init()
	{
		if(initStatus==0)
		{
			initStatus++;
			baseQueue = new SBaseQueue<SWJob>(1000000);
			threadPool = new SThreadPool;
			dout+"job module inited.";
			dout++;
		}
		return 0;
	}
Seems like it gets inited to what I want then inited ti what's above. Anyone know how to resolve this?