swh:1:snp:af87cd67498ef4fe47c76ed3e7caffe5b61facaf
Revision ad0c075e4eb9466aaac12b8f1ad5eb3a3a4bcbbb authored by Philippe Canal on 07 August 2014, 04:09:52 UTC, committed by Philippe Canal on 07 August 2014, 05:35:30 UTC
1. On windows, thread safety is achieved by relying on gVirtualX->IsCmdThread()
being false and calling gInterpreter->Execute to either use the interpreter
lock or re-route the execution (via the interpreter) to the main thread.

2. On unix, thread safety is achieved by re-routing the graphics actions to
the main thread via a queue of actions.  However this is active if and only
if gApplication->IsRunning is true (i.e. the graphics are executed directly
or indirectly from the command line ... not from a script passed as a command
line argument!).  In addition, this is effective only if the ROOT event loop
is running regularly.

Since 1. is relatively slow (interpreter compilation and function calls) and
2. is fragile/inconsistent, we added where those two mechanisms were used
(well at least the place I could find), an explicit lock on gROOTMutex to
prevent multi-thread uses of those 'protected' section.

This fixes the running of tutorials/thread/threadsh2.C

Conflicts:
	graf2d/gpad/src/TCanvas.cxx
1 parent a74a035
History
Tip revision: 6c9118fb23c981c28a53dc215c68f2be00c04e3e authored by Jonas Rembser on 12 April 2024, 19:22:15 UTC
[RF] Enable `roofit_multiprocess` on the CI
Tip revision: 6c9118f

back to top