Skip to content

Commit

Permalink
[core] Guard gInterpreterMutex in TClingClassInfo::IsEnum
Browse files Browse the repository at this point in the history
Fixes root-project#11515

This method leads to contention in some specific scenarios (see linked
issue).

Co-authored-by: Philippe Canal <[email protected]>
  • Loading branch information
vepadulano and pcanal committed Oct 18, 2022
1 parent 29f0497 commit cd09b28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/metacling/src/TClingClassInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ bool TClingClassInfo::IsBase(const char *name) const

bool TClingClassInfo::IsEnum(cling::Interpreter *interp, const char *name)
{
R__LOCKGUARD(gInterpreterMutex);
// Note: This is a static member function.
TClingClassInfo info(interp, name);
if (info.IsValid() && (info.Property() & kIsEnum)) {
Expand Down

0 comments on commit cd09b28

Please sign in to comment.