From: Christian P. <cp...@us...> - 2005-05-07 11:55:59
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29688/src/System Modified Files: Plugin.cpp Log Message: - Added thread-safety to Factory and System::Plugin Index: Plugin.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/Plugin.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Plugin.cpp 6 May 2005 15:22:46 -0000 1.1 +++ Plugin.cpp 7 May 2005 11:55:47 -0000 1.2 @@ -59,12 +59,16 @@ const Directory d(dir); // throws on error d.begin(); // avoid 'unused var' warning. // ^^^ need to find a more elegant solution for that. + + CriticalSection::ScopedLock lck(_mutex); pathFinder(ifaceType).addPath( dir ); } SharedLib* PluginManager::addPlugin(const std::string& ifaceType, const Unicode::String& so_name) throw(SystemError) { + CriticalSection::ScopedLock lck(_mutex); + // look for cached entry: PluginMap::const_iterator it = _pluginMap.find( so_name ); if( _pluginMap.end() != it ) |