Skip to content

Commit

Permalink
Merge pull request root-project#15 from Dr15Jones/recursiveLockReflex…
Browse files Browse the repository at this point in the history
…ClassPathToBase

Have to use recusive_mutex when locking Reflex::Class::PathToBase
  • Loading branch information
ktf committed Jun 7, 2014
2 parents 99dc50c + 84559df commit eece97f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cint/reflex/src/Class.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ __dynamic_cast(const void* __src_ptr, // Starting object.
}
#endif

static std::mutex gPathsToBaseLock;
static std::recursive_mutex gPathsToBaseLock;

//-------------------------------------------------------------------------------
Reflex::Class::Class(const char* typ,
Expand Down Expand Up @@ -520,7 +520,7 @@ Reflex::Class::NewBases() const {
const std::vector<Reflex::OffsetFunction>&
Reflex::Class::PathToBase(const Scope& bas) const {
//-------------------------------------------------------------------------------
std::lock_guard<std::mutex> guard(gPathsToBaseLock);
std::lock_guard<std::recursive_mutex> guard(gPathsToBaseLock);
// Return a vector of offset functions from the current class to the base class.
const BasePath_t* pathToBase = fPathsToBase[bas.Id()];

Expand Down

0 comments on commit eece97f

Please sign in to comment.