From d561ff4484bddc4ad1d5696b6c15b036edd77664 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Wed, 3 Jan 2024 17:09:36 +0000 Subject: [PATCH] Update blocking portal syntax spawn_task should be replaced with start_task_soon as per the anyio API for v4. --- src/openflexure_microscope_server/things/autofocus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openflexure_microscope_server/things/autofocus.py b/src/openflexure_microscope_server/things/autofocus.py index 4c0cc5d0..626c4a1e 100644 --- a/src/openflexure_microscope_server/things/autofocus.py +++ b/src/openflexure_microscope_server/things/autofocus.py @@ -55,7 +55,7 @@ class JPEGSharpnessMonitor: @contextmanager def run(self): """Context manager, during which we will monitor sharpness from the camera""" - self.portal.spawn_task(self.monitor_sharpness) + self.portal.start_task_soon(self.monitor_sharpness) try: yield finally: