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:
parent
25552215f9
commit
d561ff4484
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ class JPEGSharpnessMonitor:
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def run(self):
|
def run(self):
|
||||||
"""Context manager, during which we will monitor sharpness from the camera"""
|
"""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:
|
try:
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue