Commit 28ce7fb0 authored by Joel Collins's avatar Joel Collins
Browse files

Removed lock timeout for metadata IO

parent 2435842f
Loading
Loading
Loading
Loading
Loading
+46 −46
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ class Microscope:
        Return:
            dict: Dictionary containing complete microscope state
        """
        with self.lock:
        with self.lock(timeout=None):
            state = {"camera": self.camera.state, "stage": self.stage.state}
            return state

@@ -161,7 +161,7 @@ class Microscope:
        """
        Applies a settings dictionary to the microscope. Missing parameters will be left untouched.
        """
        with self.lock:
        with self.lock(timeout=None):
            logging.debug("Microscope: Applying settings: {}".format(settings))

            # If attached to a camera
@@ -199,8 +199,6 @@ class Microscope:
        This is to ensure that settings for currently disconnected hardware
        don't get removed from the settings file.
        """
        with self.lock:

        settings_current = {
            "id": self.id,
            "name": self.name,
@@ -208,6 +206,7 @@ class Microscope:
            "extensions": self.extension_settings,
        }

        with self.lock(timeout=None):
            # If attached to a camera
            if self.camera:
                    settings_current_camera = self.camera.read_settings()
@@ -255,6 +254,7 @@ class Microscope:

    @property
    def configuration(self):
        with self.lock(timeout=None):
            initial_configuration = self.configuration_file.load()

            current_configuration = {