def acquire_lock(self, blocking=True):
        """
        Lock the screen for modification so that it will not be corrupted.
        :param blocking: By default the method blocks until a lock is acquired.
        """
        locked = self.lock.acquire(blocking)
        try:
            yield locked
        finally:
            if locked:
                self.lock.release()

        Lock the screen for modification so that it will not be corrupted.
        :param blocking: By default the method blocks until a lock is acquired.
        
system/shscreens.py