Commit 7c8be14a authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'lock.DataModelRoot-20220520' into 'master'

DataModelRoot: ROOT locking fix.

See merge request atlas/athena!53539
parents 3e316f67 ce0308cb
......@@ -587,6 +587,7 @@ TScopeAdapter TScopeAdapter::ByNameNoQuiet (
//____________________________________________________________________________
TScopeAdapter TScopeAdapter::TypeAt( size_t nth )
{
R__READ_LOCKGUARD (ROOT::gCoreMutex);
const char *class_name = gClassTable->At( nth );
// prevent autoloading, as it could change gClassTable
return class_name? TScopeAdapter( string(class_name), false ) : TScopeAdapter();
......@@ -597,8 +598,7 @@ size_t TScopeAdapter::TypeSize()
{
// return total number of types in the system (this is stupid, as the number
// of types is dynamic ...)
// ??? The THREAD_SAFE here is in principle wrong.
// However, in practice it should be ok, and heads off a big mess downstream.
R__READ_LOCKGUARD (ROOT::gCoreMutex);
TClassTable* tab ATLAS_THREAD_SAFE = gClassTable;
return tab ? tab->Classes() : 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment