[ROOT] Threads and Draw

From: Thomas Bretz (Thomas_Bretz@ph.tum.de)
Date: Mon Oct 06 2003 - 14:32:50 MEST


Dear all,

I have:
Two TCanvas (c1 and c2)

I'm filling c1 from thread 1 (c1->cd(); obj->Draw();) and the same in
thread 2 for a different object and c2.

In some cases this gives wrong results, becuase gPad (which is set in
c1->cd() and c2->Ccd()) is global. Because the decision into whih canvas I
want to draw (cd()) is done at a completely different place in my program
than calling draw it would need a big effort to use Mutices here.

Has somebody an idea how I could make this thread-safe?

Thanks,
Thomas.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET