Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move gROOT initialization to more central place in the threadsafely i…
…nitialization
  • Loading branch information
pcanal committed Jun 22, 2017
commit 75ff73730a5380b241080eb54fb679b4729056a6
3 changes: 0 additions & 3 deletions core/base/src/TROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,6 @@ namespace Internal {
/// Enables the global mutex to make ROOT thread safe/aware.
void EnableThreadSafety()
{
// 'Insure' gROOT is created before initializing the Thread safe behavior
// (to make sure we do not have two attempting to create it).
GetROOT();
static void (*sym)() = (void(*)())Internal::GetSymInLibImt("ROOT_TThread_Initialize");
if (sym)
sym();
Expand Down
4 changes: 4 additions & 0 deletions core/thread/src/TThread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ void TThread::Init()
::Fatal("Init","_REENTRANT must be #define-d for TThread to work properly.");
#endif

// 'Insure' gROOT is created before initializing the Thread safe behavior
// (to make sure we do not have two attempting to create it).
ROOT::GetROOT();

fgThreadImp = gThreadFactory->CreateThreadImp();
gMainInternalMutex = new TMutex(kTRUE);

Expand Down