bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
11 stars 26 forks source link

Yield in each loop of observe_value #648

Closed coretl closed 1 week ago

coretl commented 1 week ago

This helps in the very specific case of an observe_value directly or indirectly modifying the signal that is being updated. This creates a busy loop which will not be interrupted by wrapping in asyncio.wait_for. To demonstrate, added test_observe_value_times_out_with_no_external_task

Originally discussed in https://github.com/DiamondLightSource/dodal/pull/897