Hi Tanguy, On Fri, Aug 7, 2009 at 3:14 PM, Tanguy Fautre<tang...@aristechnologies.com> wrote: > I had the chance to test your patch. As expected, it fixes the problem. > The debugger shows the singleton is only initialized well after DllMain > has been called. No deadlock to report.
Great, a good first step then. > As you stated, we need to fix all the getenv() that can be called from > constructing a global singleton. We've seen our app deadlocking on them > before. With your other work I presume you've not enumerated all the files that have this global static's that use getenv? Do you have a list? My thought is to look at the usage pattern and then come up with standard implementation pattern for these variables. Clearly it'll involve a singleton access method/function, but this might be something we can use macro's or templates to help keep regular. > Not sure if you want to apply the patch as it stands though, as > thread-safety is quite important to us. Init is usually done single threaded, is there something specific about the threading model you have that concerns you? There may be cases which threading may be an issue, but most cases I'd guess as not being threaded, we'll want to avoid adding mutex locks across the board. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org