ROOT thread on Mac OS X 10.6.1

Hello all

I installed ftp://root.cern.ch/root/root_v5.25.02.m … 4.0.tar.gz on the Mac OS X 10.6.1.
Then I tested it’s thread support with threads.C in tutorials/thread

This is the output.

The numbers after “thread” aren’t 1, 2 or 3 and they aren’t shuffled.
My application has the same problem. Should I compile ROOT by myself?

This looks indeed not correct. Please try to recompile ROOT from source and try again. This is what I get:

root [0] .x threads.C
This script can only be executed via ACliC: .x threads.C++
root [1] .x threads.C+
Info in <ACLiC>: script has already been loaded in interpreted mode
Info in <ACLiC>: unloading /Users/rdm/root/tutorials/thread/./threads.C and compiling it
Info in <TUnixSystem::ACLiC>: creating shared library /Users/rdm/root/tutorials/thread/./threads_C.so
Starting Thread 1
Info in <TThread::Run h1:0x102b81000>: thread run requested
Starting Thread 2
Info in <TThread::Run h2:0x102d81000>: thread run requested
Starting Thread 3
Info in <TThread::Run h3:0x102e04000>: thread run requested
     Thread                   State
  3  h3:0x102e04000           Running    
  2  h2:0x102d81000           Running    
  1  h1:0x102b81000           Running      // ERRO
Info in <TThread::Run JoinHelper:0x102e87000>: thread run requested
Info in <TThread::Function h1:0x102b81000>: thread is running
Info in <TThread::Function h2:0x102d81000>: thread is running
Info in <TThread::Function JoinHelper:0x102e87000>: thread is running
Info in <TThread::Function h3:0x102e04000>: thread is running
Here I am loop index:   0 , thread: 1
Here I am loop index:   0 , thread: 2
Here I am loop index:   0 , thread: 3
Here I am loop index:   1 , thread: 1
Here I am loop index:   1 , thread: 2
Here I am loop index:   1 , thread: 3
Here I am loop index:   2 , thread: 1
Here I am loop index:   2 , thread: 2
Here I am loop index:   2 , thread: 3
Here I am loop index:   3 , thread: 1
Here I am loop index:   3 , thread: 2
Here I am loop index:   3 , thread: 3
Here I am loop index:   4 , thread: 1
Here I am loop index:   4 , thread: 2
Here I am loop index:   4 , thread: 3
Here I am loop index:   5 , thread: 1
Here I am loop index:   5 , thread: 2
Here I am loop index:   5 , thread: 3
Here I am loop index:   6 , thread: 1
Here I am loop index:   6 , thread: 2
Here I am loop index:   6 , thread: 3
Here I am loop index:   7 , thread: 1
Here I am loop index:   7 , thread: 2
Here I am loop index:   7 , thread: 3
Here I am loop index:   8 , thread: 1
Here I am loop index:   8 , thread: 2
Here I am loop index:   8 , thread: 3
Here I am loop index:   9 , thread: 1
Here I am loop index:   9 , thread: 2
Here I am loop index:   9 , thread: 3
Info in <TThread::AfterCancel h1:0x102b81000>: thread is canceled
Info in <TThread::Function h1:0x102b81000>: thread has finished
Info in <TThread::~TThread JoinHelper:0x102e87000>: thread deleted
     Thread                   State
  3  h3:0x102e04000           Running    
  2  h2:0x102d81000           Canceled     // ERRO
  1  h1:0x102b81000           Canceled   
Info in <TThread::Run JoinHelper:0x102b81000>: thread run requested
Info in <TThread::AfterCancel h2:0x102d81000>: thread is canceled
Info in <TThread::Function JoinHelper:0x102b81000>: thread is running
Info in <TThread::AfterCancel h3:0x102e04000>: thread is canceled
Info in <TThread::Function h2:0x102d81000>: thread has finished
Info in <TThread::~TThread JoinHelper:0x102b81000>: thread deleted
Info in <TThread::Run JoinHelper:0x102b81000>: thread run requested
Info in <TThread::Function h3:0x102e04000>: thread has finished
Info in <TThread::Function JoinHelper:0x102b81000>: thread is running
Info in <TThread::~TThread JoinHelper:0x102b81000>: thread deleted
     Thread                   State
  3  h3:0x102e04000           Canceled   
  2  h2:0x102d81000           Canceled   
  1  h1:0x102b81000           Canceled   

Hi,

actually this was an issue with threads.C and it’s now fixed in the trunk. Thanks for your report!

Axel.