From 7c1c49eff2169e0f8fea5b1260bfa8dced270cb4 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 24 Jun 2020 10:39:00 +0100 Subject: [PATCH] Added 5 second timeout to device locks --- openflexure_microscope/camera/base.py | 2 +- openflexure_microscope/stage/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/camera/base.py b/openflexure_microscope/camera/base.py index d099ee43..943e2f4f 100644 --- a/openflexure_microscope/camera/base.py +++ b/openflexure_microscope/camera/base.py @@ -23,7 +23,7 @@ class BaseCamera(metaclass=ABCMeta): self.thread = None self.camera = None - self.lock = StrictLock(name="Camera") + self.lock = StrictLock(name="Camera", timeout=5) self.frame = None self.last_access = 0 diff --git a/openflexure_microscope/stage/base.py b/openflexure_microscope/stage/base.py index 092d401a..d7510a6a 100644 --- a/openflexure_microscope/stage/base.py +++ b/openflexure_microscope/stage/base.py @@ -11,7 +11,7 @@ class BaseStage(metaclass=ABCMeta): """ def __init__(self): - self.lock = StrictLock(name="Stage") + self.lock = StrictLock(name="Stage", timeout=5) @abstractmethod def update_settings(self, config: dict):