def __init__(self, obj):
        """
        Initialize the class with the object to make thread safe.
        """
        self.lock = threading.RLock()
        self.object = obj

        Initialize the class with the object to make thread safe.
        
recipes/Python/541081_Thread_Safe_Any_Object/recipe-541081.py