Skip to content

Commit

Permalink
Add asyncio sleep to async for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
olliesilvester committed Nov 11, 2024
1 parent bcd40a3 commit 69cea7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dodal/devices/oav/pin_image_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ async def _set_triggered_tip():
"""
async for value in observe_value(self.array_data):
try:
await asyncio.sleep(0)
location = await self._get_tip_and_edge_data(value)
self._set_triggered_values(location)
except Exception as e:
Expand Down

0 comments on commit 69cea7b

Please sign in to comment.