Update blocking portal syntax

spawn_task should be replaced with start_task_soon as per the
anyio API for v4.
This commit is contained in:
Richard Bowman 2024-01-03 17:09:36 +00:00
parent 25552215f9
commit d561ff4484

View file

@ -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: