The intended lock for the interpreter and gROOT is gInterpreterMutex.

gInterpreterMutex is aliases to gROOTMutex.  gGlobalMutex is a lower level lock.
Disable locking in PyROOT::TMethodHolder::Execute.

In v5 code execution on interpreted function and type database manipulation
are intertwined, so technical once a thread starts the execution of code
via CINT, no other threads can access the database (and since we also had
to alias the CINT and main ROOT mutex, no other threads can execute protected
ROOT operation like some deletions).

In v5, short of significant modifications inside CINT, we can not resolve
completely this problem and we must choose between the risk of dead lock
and the risk inherent with the 'unprotected' calls to CINT from PyROOT.
Since the earlier has a 100% probability and the later has a bit less chance
of happening, we disable the lock in PyROOT.

In v6, the database updates and the code execution is well separated and
we will be able to release the database lock before code execution and the
lock will be managed internally by core/meta. So in v6, the lock will also
be unnecessary.
Avoid deleting ROOT resources after gROOT has been deleted