Hi,
I’ve uploaded a short macro which creates a very simple gui. The gui has a little red box in a canvas. There are two buttons called ‘Run In Thread’ and ‘Run In Series’. Both of these buttons call the same function which moves the box along. However, one of the them is run in a thread and one is not. For the threaded case, you can click on and click off the button to make it start/stop. For the serial case you have to wait for it to finish (take 2 secs).
On my machine, the threaded version runs a lot lot slower than the serial version - even though the exact same function is called. I can’t figure out why this happens. Does anyone see the same behaviour - can you explain it?
The gui was partially built using the root gui builder - then I added my own stuff manually. There is a single class called myClass. I compile the macro using aclic and then just create a single instance.
I am using root 5.25/04 on os x 10.6.2 with gcc 4.2.1
thanks
Peter
myClass.C (4.45 KB)