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
File Mode Size
src
CMakeLists.txt -rw-r--r-- 2.5 KB
Module.mk -rw-r--r-- 3.2 KB
ModuleVars.mk -rw-r--r-- 2.8 KB

back to top