Removed lock timeout for metadata IO
This commit is contained in:
parent
2435842ff6
commit
28ce7fb08b
1 changed files with 45 additions and 45 deletions
|
|
@ -153,7 +153,7 @@ class Microscope:
|
||||||
Return:
|
Return:
|
||||||
dict: Dictionary containing complete microscope state
|
dict: Dictionary containing complete microscope state
|
||||||
"""
|
"""
|
||||||
with self.lock:
|
with self.lock(timeout=None):
|
||||||
state = {"camera": self.camera.state, "stage": self.stage.state}
|
state = {"camera": self.camera.state, "stage": self.stage.state}
|
||||||
return state
|
return state
|
||||||
|
|
||||||
|
|
@ -161,7 +161,7 @@ class Microscope:
|
||||||
"""
|
"""
|
||||||
Applies a settings dictionary to the microscope. Missing parameters will be left untouched.
|
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))
|
logging.debug("Microscope: Applying settings: {}".format(settings))
|
||||||
|
|
||||||
# If attached to a camera
|
# If attached to a camera
|
||||||
|
|
@ -199,8 +199,6 @@ class Microscope:
|
||||||
This is to ensure that settings for currently disconnected hardware
|
This is to ensure that settings for currently disconnected hardware
|
||||||
don't get removed from the settings file.
|
don't get removed from the settings file.
|
||||||
"""
|
"""
|
||||||
with self.lock:
|
|
||||||
|
|
||||||
settings_current = {
|
settings_current = {
|
||||||
"id": self.id,
|
"id": self.id,
|
||||||
"name": self.name,
|
"name": self.name,
|
||||||
|
|
@ -208,6 +206,7 @@ class Microscope:
|
||||||
"extensions": self.extension_settings,
|
"extensions": self.extension_settings,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
with self.lock(timeout=None):
|
||||||
# If attached to a camera
|
# If attached to a camera
|
||||||
if self.camera:
|
if self.camera:
|
||||||
settings_current_camera = self.camera.read_settings()
|
settings_current_camera = self.camera.read_settings()
|
||||||
|
|
@ -255,6 +254,7 @@ class Microscope:
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def configuration(self):
|
def configuration(self):
|
||||||
|
with self.lock(timeout=None):
|
||||||
initial_configuration = self.configuration_file.load()
|
initial_configuration = self.configuration_file.load()
|
||||||
|
|
||||||
current_configuration = {
|
current_configuration = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue