Removed lock timeout for metadata IO

This commit is contained in:
Joel Collins 2020-06-25 16:48:30 +01:00
parent 2435842ff6
commit 28ce7fb08b

View file

@ -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 = {