From Frashud Lashkari, "I was getting "Unsupported wrapper class..." error messages when attempting to load osgb models simultaneously from multiple threads. I believe the problem is caused by un-synchronized access to the global osgDB::ObjectWrapperManager class. I've attached a change that adds a mutex to the class and uses it when accessing the internal wrapper/compress maps. This appears to fix the issues I was having."

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14880 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-06-01 12:07:04 +00:00
parent 78a01ce2a5
commit 120bf699b2
2 changed files with 15 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
#ifndef OSGDB_OBJECTWRAPPER
#define OSGDB_OBJECTWRAPPER
#include <OpenThreads/ReentrantMutex>
#include <osgDB/Serializer>
#include <osg/ScriptEngine>
@@ -169,6 +170,8 @@ protected:
ObjectWrapperManager();
virtual ~ObjectWrapperManager();
OpenThreads::ReentrantMutex _wrapperMutex;
WrapperMap _wrappers;
CompressorMap _compressors;