Hi Michael, On Fri, Nov 26, 2010 at 10:34 AM, Michael Platings <[email protected]> wrote: > In that case I was thinking of a different potential problem :) > What was the problem exactly?
Look to be an issue with ordering of initialization of static variables from one NodeKit to another. The only way to ensure safe ordering was to place the static variables within the scope of the singleton method. > I want OSG to be as thread safe as possible so > I'm keen to find a solution that solves both issues. Ones are very real problem that stops you regardless of threading - all static apps fail at startup. The other problem will only occurs in very specific threading usage models and if your unlucky during startup of the threads that they exactly overlap. In theory the later could be an issue, but as yet I've never seen a bug reported that was traced back to this. Solving the the possible initialization threading issue should be a low priority for us - there are many problems that effect a far wider set of users.. like the the glsl_julia.osg regression that points to wider problems. In terms of possible solutions for this theoritical threading bug, wouldn't just invoking the singleton at start up be suffcient? A global static object that is constructed that then invokes the singleton method would seems to me sufficient to do this. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
