The implementation of threading.RLock is a java ReentrantLock under the hood. The jython class is a context manager and can be used with the with statement.
Dabbling in system.util.globals requires some care--especially to not accidentally include any custom code in stored objects. Since you tagged this topic as v8.1, you should also be aware of this issue: