Hi Robert -- In an app I'm working on, I fire off multiple threads to read multiple files asynchronously (in this case, .OSG files). This seems to work OK on my dual core Windows laptop, but fails roughly 80% of the time on my 8-core Mac. The stack trace shows 2 or more threads allocating a std::map within initGLNames() (osgPlugins/osg/StateSet.cpp). This function does not appear to be thread-safe; it adds several entries to a static variable called s_GLNameToGLModeMap.

Is it a design intent that reading .OSG files must be done serially and not asynchronously? More generally -- .OSG files aside -- should an app be able to launch multiple threads to load files asynchronously?

If reading .OSG files is intended to be a thread-safe operation, I can prepare a submission. Any thoughts on this would be appreciated, thanks.
  -Paul

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to