Threading also has an RLock module, better use it